File tree Expand file tree Collapse file tree 10 files changed +36
-36
lines changed
rfcs/rfc-2457-non-ascii-idents Expand file tree Collapse file tree 10 files changed +36
-36
lines changed Original file line number Diff line number Diff line change @@ -2212,7 +2212,6 @@ ui/issues/issue-41479.rs
22122212ui/issues/issue-41498.rs
22132213ui/issues/issue-41549.rs
22142214ui/issues/issue-41604.rs
2215- ui/issues/issue-41628.rs
22162215ui/issues/issue-41652/auxiliary/issue-41652-b.rs
22172216ui/issues/issue-41652/issue-41652.rs
22182217ui/issues/issue-41677.rs
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use ignore::Walk;
1717const 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
2222const EXPECTED_TEST_FILE_EXTENSIONS : & [ & str ] = & [
2323 "rs" , // test source files
Original file line number Diff line number Diff line change 1+ //! Checks that `#[used]` cannot be used on invalid positions.
2+ #![ crate_type = "lib" ]
3+
14#[ used]
25static FOO : u32 = 0 ; // OK
36
@@ -13,4 +16,8 @@ trait Bar {}
1316#[ used] //~ ERROR attribute must be applied to a `static` variable
1417impl 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 number Diff line number Diff line change 11error: attribute must be applied to a `static` variable
2- --> $DIR/used.rs:4 :1
2+ --> $DIR/used.rs:7 :1
33 |
44LL | #[used]
55 | ^^^^^^^
66LL | fn foo() {}
77 | ----------- but this is a function
88
99error: attribute must be applied to a `static` variable
10- --> $DIR/used.rs:7 :1
10+ --> $DIR/used.rs:10 :1
1111 |
1212LL | #[used]
1313 | ^^^^^^^
1414LL | struct Foo {}
1515 | ------------- but this is a struct
1616
1717error: attribute must be applied to a `static` variable
18- --> $DIR/used.rs:10 :1
18+ --> $DIR/used.rs:13 :1
1919 |
2020LL | #[used]
2121 | ^^^^^^^
2222LL | trait Bar {}
2323 | ------------ but this is a trait
2424
2525error: attribute must be applied to a `static` variable
26- --> $DIR/used.rs:13 :1
26+ --> $DIR/used.rs:16 :1
2727 |
2828LL | #[used]
2929 | ^^^^^^^
3030LL | 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
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
109struct X {
11- δ : usize
10+ δ : usize ,
1211}
1312
1413pub fn main ( ) {
You can’t perform that action at this time.
0 commit comments