2024-04-09 09:36:58 -05:00
|
|
|
//@ 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!
|
|
|
|
}
|
2024-05-07 18:13:33 -05:00
|
|
|
|
|
|
|
macro_rules! t {
|
|
|
|
() => { mod test { 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!
|
|
|
|
}
|
|
|
|
|
2024-06-13 20:10:05 -05:00
|
|
|
fn test<'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!
|
|
|
|
|
2024-05-07 18:13:33 -05:00
|
|
|
t!();
|