Skip to content

Commit 60c32f6

Browse files
committed
Move more tests/ui tests
1 parent dbab4e1 commit 60c32f6

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

src/tools/tidy/src/issues.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,6 @@ ui/issues/issue-41479.rs
22122212
ui/issues/issue-41498.rs
22132213
ui/issues/issue-41549.rs
22142214
ui/issues/issue-41604.rs
2215-
ui/issues/issue-41628.rs
22162215
ui/issues/issue-41652/auxiliary/issue-41652-b.rs
22172216
ui/issues/issue-41652/issue-41652.rs
22182217
ui/issues/issue-41677.rs

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ignore::Walk;
1717
const ENTRY_LIMIT: u32 = 901;
1818
// FIXME: The following limits should be reduced eventually.
1919

20-
const ISSUES_ENTRY_LIMIT: u32 = 1624;
20+
const ISSUES_ENTRY_LIMIT: u32 = 1623;
2121

2222
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2323
"rs", // test source files

tests/ui/used.rs renamed to tests/ui/attributes/positions/used.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Checks that `#[used]` cannot be used on invalid positions.
2+
#![crate_type = "lib"]
3+
14
#[used]
25
static FOO: u32 = 0; // OK
36

@@ -13,4 +16,8 @@ trait Bar {}
1316
#[used] //~ ERROR attribute must be applied to a `static` variable
1417
impl Bar for Foo {}
1518

16-
fn main() {}
19+
// Regression test for <https://github.com/rust-lang/rust/issues/126789>.
20+
extern "C" {
21+
#[used] //~ ERROR attribute must be applied to a `static` variable
22+
static BAR: i32;
23+
}
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
error: attribute must be applied to a `static` variable
2-
--> $DIR/used.rs:4:1
2+
--> $DIR/used.rs:7:1
33
|
44
LL | #[used]
55
| ^^^^^^^
66
LL | fn foo() {}
77
| ----------- but this is a function
88

99
error: attribute must be applied to a `static` variable
10-
--> $DIR/used.rs:7:1
10+
--> $DIR/used.rs:10:1
1111
|
1212
LL | #[used]
1313
| ^^^^^^^
1414
LL | struct Foo {}
1515
| ------------- but this is a struct
1616

1717
error: attribute must be applied to a `static` variable
18-
--> $DIR/used.rs:10:1
18+
--> $DIR/used.rs:13:1
1919
|
2020
LL | #[used]
2121
| ^^^^^^^
2222
LL | trait Bar {}
2323
| ------------ but this is a trait
2424

2525
error: attribute must be applied to a `static` variable
26-
--> $DIR/used.rs:13:1
26+
--> $DIR/used.rs:16:1
2727
|
2828
LL | #[used]
2929
| ^^^^^^^
3030
LL | impl Bar for Foo {}
3131
| ------------------- but this is a implementation block
3232

33-
error: aborting due to 4 previous errors
33+
error: attribute must be applied to a `static` variable
34+
--> $DIR/used.rs:21:5
35+
|
36+
LL | #[used]
37+
| ^^^^^^^
38+
LL | static BAR: i32;
39+
| ---------------- but this is a foreign static item
40+
41+
error: aborting due to 5 previous errors
3442

tests/ui/attributes/used-issue-126789.rs

-6
This file was deleted.

tests/ui/attributes/used-issue-126789.stderr

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! Checks that the `dead_code` lint does not consider `#[used]` items unused.
2+
//! Regression test for <https://github.com/rust-lang/rust/issues/41628>.
3+
4+
//@ check-pass
5+
#![deny(dead_code)]
6+
7+
#[used]
8+
static FOO: u32 = 0;
9+
10+
fn main() {}
File renamed without changes.

tests/ui/issues/issue-41628.rs

-7
This file was deleted.

tests/ui/utf8_idents.rs renamed to tests/ui/rfcs/rfc-2457-non-ascii-idents/utf8_idents.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
//! Check that non-ascii-idents are allowed.
2+
13
//@ check-pass
24
//
35
#![allow(mixed_script_confusables, non_camel_case_types)]
46

5-
fn foo<
6-
'β,
7-
γ
8-
>() {}
7+
fn foo<'β, γ>() {}
98

109
struct X {
11-
δ: usize
10+
δ: usize,
1211
}
1312

1413
pub fn main() {

0 commit comments

Comments
 (0)