-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deny gen keyword in edition_2024_compat lints
- Loading branch information
1 parent
7f2fc33
commit 7789874
Showing
16 changed files
with
158 additions
and
36 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: `gen` is a keyword in the 2024 edition | ||
--> $DIR/gen-kw.rs:6:4 | ||
| | ||
LL | fn gen() {} | ||
| ^^^ help: you can use a raw identifier to stay compatible: `r#gen` | ||
| | ||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024! | ||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716> | ||
note: the lint level is defined here | ||
--> $DIR/gen-kw.rs:4:9 | ||
| | ||
LL | #![deny(rust_2024_compatibility)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: `#[deny(keyword_idents_2024)]` implied by `#[deny(rust_2024_compatibility)]` | ||
|
||
error: `gen` is a keyword in the 2024 edition | ||
--> $DIR/gen-kw.rs:12:9 | ||
| | ||
LL | let gen = r#gen; | ||
| ^^^ help: you can use a raw identifier to stay compatible: `r#gen` | ||
| | ||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024! | ||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716> | ||
|
||
error: aborting due to 2 previous errors | ||
|
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: `gen` is a keyword in the 2024 edition | ||
--> $DIR/gen-kw.rs:6:4 | ||
| | ||
LL | fn gen() {} | ||
| ^^^ help: you can use a raw identifier to stay compatible: `r#gen` | ||
| | ||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2024! | ||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716> | ||
note: the lint level is defined here | ||
--> $DIR/gen-kw.rs:4:9 | ||
| | ||
LL | #![deny(rust_2024_compatibility)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: `#[deny(keyword_idents_2024)]` implied by `#[deny(rust_2024_compatibility)]` | ||
|
||
error: `gen` is a keyword in the 2024 edition | ||
--> $DIR/gen-kw.rs:12:9 | ||
| | ||
LL | let gen = r#gen; | ||
| ^^^ help: you can use a raw identifier to stay compatible: `r#gen` | ||
| | ||
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2024! | ||
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716> | ||
|
||
error: aborting due to 2 previous errors | ||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//@ revisions: e2015 e2018 | ||
//@[e2018] edition: 2018 | ||
|
||
#![deny(rust_2024_compatibility)] | ||
|
||
fn gen() {} | ||
//~^ ERROR `gen` is a keyword in the 2024 edition | ||
//[e2015]~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024! | ||
//[e2018]~| WARNING this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2024! | ||
|
||
fn main() { | ||
let gen = r#gen; | ||
//~^ ERROR `gen` is a keyword in the 2024 edition | ||
//[e2015]~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024! | ||
//[e2018]~| WARNING this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2024! | ||
} |