]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-54044.rs
Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-54044.rs
1 // ignore-tidy-linelength
2 #![deny(unused_attributes)] //~ NOTE lint level is defined here
3
4 #[cold]
5 //~^ ERROR attribute should be applied to a function
6 //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
7 struct Foo; //~ NOTE not a function
8
9 fn main() {
10     #[cold]
11     //~^ ERROR attribute should be applied to a function
12     //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13     5; //~ NOTE not a function
14 }