-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make inline associated constants a future compatibility warning
- Loading branch information
Showing
3 changed files
with
54 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,72 @@ | ||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:26:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:30:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | static X: u32; | ||
| -------------- not a function or closure | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:29:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:33:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | type T; | ||
| ------- not a function or closure | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:5:5 | ||
warning: `#[inline]` is ignored on constants | ||
--> $DIR/inline-trait-and-foreign-items.rs:7:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | const X: u32; | ||
| ------------- not a function or closure | ||
| | ||
note: lint level defined here | ||
--> $DIR/inline-trait-and-foreign-items.rs:4:9 | ||
| | ||
LL | #![warn(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #65833 <https://github.com/rust-lang/rust/issues/65833> | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:8:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:11:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | type T; | ||
| ------- not a function or closure | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:15:5 | ||
warning: `#[inline]` is ignored on constants | ||
--> $DIR/inline-trait-and-foreign-items.rs:18:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | const X: u32 = 0; | ||
| ----------------- not a function or closure | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #65833 <https://github.com/rust-lang/rust/issues/65833> | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:18:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:22:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | type T = Self; | ||
| -------------- not a function or closure | ||
|
||
error[E0518]: attribute should be applied to function or closure | ||
--> $DIR/inline-trait-and-foreign-items.rs:21:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:25:5 | ||
| | ||
LL | #[inline] | ||
| ^^^^^^^^^ | ||
LL | type U = impl Trait; | ||
| -------------------- not a function or closure | ||
|
||
error: could not find defining uses | ||
--> $DIR/inline-trait-and-foreign-items.rs:22:5 | ||
--> $DIR/inline-trait-and-foreign-items.rs:26:5 | ||
| | ||
LL | type U = impl Trait; | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 8 previous errors | ||
error: aborting due to 6 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0518`. |