Auto merge of #14062 - WaffleLapkin:сurrent_edition, r=Veykril

internal: Set "current" edition to 2021

:p
This commit is contained in:
bors 2023-01-31 11:03:49 +00:00
commit 06981d4b10
7 changed files with 28 additions and 28 deletions

View File

@ -282,7 +282,7 @@ pub enum Edition {
}
impl Edition {
pub const CURRENT: Edition = Edition::Edition2018;
pub const CURRENT: Edition = Edition::Edition2021;
}
#[derive(Default, Debug, Clone, PartialEq, Eq)]

View File

@ -811,7 +811,7 @@ fn different_crate_reexport() {
fn prelude() {
check_found_path(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
$0
//- /std.rs crate:std
pub mod prelude {
@ -852,7 +852,7 @@ pub mod rust_2018 {
fn imported_prelude() {
check_found_path(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
use S;
$0
//- /std.rs crate:std
@ -872,7 +872,7 @@ pub mod rust_2018 {
#[test]
fn enum_variant_from_prelude() {
let code = r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
$0
//- /std.rs crate:std
pub mod prelude {
@ -1273,7 +1273,7 @@ fn inner() {}
fn prelude_with_inner_items() {
check_found_path(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
fn f() {
fn inner() {}
$0

View File

@ -476,7 +476,7 @@ fn foo() {}
fn no_std_prelude() {
check(
r#"
//- /main.rs crate:main deps:core,std
//- /main.rs edition:2018 crate:main deps:core,std
#![cfg_attr(not(never), no_std)]
use Rust;
@ -544,7 +544,7 @@ pub mod rust_2021 {
fn std_prelude_takes_precedence_above_core_prelude() {
check(
r#"
//- /main.rs crate:main deps:core,std
//- /main.rs edition:2018 crate:main deps:core,std
use {Foo, Bar};
//- /std.rs crate:std deps:core
@ -574,7 +574,7 @@ pub mod rust_2018 {
fn cfg_not_test() {
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
use {Foo, Bar, Baz};
//- /lib.rs crate:std
@ -602,7 +602,7 @@ pub mod rust_2018 {
fn cfg_test() {
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
use {Foo, Bar, Baz};
//- /lib.rs crate:std cfg:test,feature=foo,feature=bar,opt=42

View File

@ -264,7 +264,7 @@ fn prelude_is_macro_use() {
cov_mark::check!(prelude_is_macro_use);
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
structs!(Foo);
structs_priv!(Bar);
structs_outside!(Out);
@ -634,7 +634,7 @@ fn macro_dollar_crate_is_correct_in_indirect_deps() {
// From std
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
foo!();
//- /std.rs crate:std deps:core
@ -1034,7 +1034,7 @@ fn resolve_macro_def() {
fn macro_in_prelude() {
check(
r#"
//- /lib.rs crate:lib deps:std
//- /lib.rs edition:2018 crate:lib deps:std
global_asm!();
//- /std.rs crate:std

View File

@ -813,7 +813,7 @@ fn test() {
fn method_resolution_trait_from_prelude() {
check_types(
r#"
//- /main.rs crate:main deps:core
//- /main.rs edition:2018 crate:main deps:core
struct S;
impl Clone for S {}
@ -1527,7 +1527,7 @@ fn f(x: U2) {
fn skip_array_during_method_dispatch() {
check_types(
r#"
//- /main2018.rs crate:main2018 deps:core
//- /main2018.rs crate:main2018 deps:core edition:2018
use core::IntoIterator;
fn f() {

View File

@ -61,7 +61,7 @@ fn _alpha() {}
fn completes_prelude() {
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
fn foo() { let x: $0 }
//- /std/lib.rs crate:std
@ -83,7 +83,7 @@ pub mod rust_2018 {
fn completes_prelude_macros() {
check(
r#"
//- /main.rs crate:main deps:std
//- /main.rs edition:2018 crate:main deps:std
fn f() {$0}
//- /std/lib.rs crate:std
@ -117,14 +117,14 @@ fn foo() { let x: $0 }
//- /core/lib.rs crate:core
pub mod prelude {
pub mod rust_2018 {
pub mod rust_2021 {
pub struct Option;
}
}
//- /std/lib.rs crate:std deps:core
pub mod prelude {
pub mod rust_2018 {
pub mod rust_2021 {
pub struct String;
}
}

View File

@ -1357,7 +1357,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
1,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1404,7 +1404,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
2,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1441,7 +1441,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
3,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1478,7 +1478,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
4,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1515,7 +1515,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
5,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1562,7 +1562,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
6,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1599,7 +1599,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
7,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1709,7 +1709,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
8,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1746,7 +1746,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
9,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {
@ -1783,7 +1783,7 @@ fn rust_project_hello_world_project_model() {
root_file_id: FileId(
10,
),
edition: Edition2018,
edition: Edition2021,
version: None,
display_name: Some(
CrateDisplayName {