You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/feature-gates/feature-gate-rustc-attrs-1.rs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,12 @@
5
5
//~| NOTE the `#[rustc_nonnull_optimization_guaranteed]` attribute is an internal implementation detail that will never be stable
6
6
//~| NOTE the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to document guaranteed niche optimizations in the standard library
7
7
//~| NOTE the compiler does not even check whether the type indeed is being non-null-optimized; it is your responsibility to ensure that the attribute is only used on types that are optimized
8
-
fnmain(){}
8
+
structFoo{}
9
9
10
10
#[rustc_variance]
11
11
//~^ ERROR use of an internal attribute [E0658]
12
12
//~| NOTE the `#[rustc_variance]` attribute is an internal implementation detail that will never be stable
13
13
//~| NOTE the `#[rustc_variance]` attribute is used for rustc unit tests
0 commit comments