Skip to content

Commit

Permalink
tests/ui: Add a directory for warnings, add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
pacak committed Mar 22, 2024
1 parent bf12aa4 commit 7c45b9f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1750;
const ROOT_ENTRY_LIMIT: usize = 859;
const ROOT_ENTRY_LIMIT: usize = 860;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
23 changes: 23 additions & 0 deletions tests/ui/warnings/no-explicit-path-issue-122509.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//@ build-pass
//@ compile-flags: -C codegen-units=2 --emit asm

fn one() -> usize {
1
}

pub mod a {
pub fn two() -> usize {
::one() + ::one()
}
}

pub mod b {
pub fn three() -> usize {
::one() + ::a::two()
}
}

fn main() {
a::two();
b::three();
}

0 comments on commit 7c45b9f

Please sign in to comment.