Skip to content

Commit 3f9b198

Browse files
committed
rename tests' revisions to allow testing multiple editions
1 parent 586ff15 commit 3f9b198

20 files changed

+93
-93
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@ edition: 2024
2-
//@ revisions: classic structural
2+
//@ revisions: classic2024 structural2024
33
//! Tests for pattern errors not handled by the pattern typing rules, but by borrowck.
44
#![allow(incomplete_features)]
5-
#![cfg_attr(classic, feature(ref_pat_eat_one_layer_2024))]
6-
#![cfg_attr(structural, feature(ref_pat_eat_one_layer_2024_structural))]
5+
#![cfg_attr(classic2024, feature(ref_pat_eat_one_layer_2024))]
6+
#![cfg_attr(structural2024, feature(ref_pat_eat_one_layer_2024_structural))]
77

88
pub fn main() {
99
if let Some(&Some(x)) = Some(&Some(&mut 0)) {
@@ -15,23 +15,23 @@ pub fn main() {
1515
//~^ cannot borrow data in a `&` reference as mutable [E0596]
1616

1717
if let &Some(Some(x)) = &Some(&mut Some(0)) {
18-
//[classic]~^ ERROR: cannot borrow data in a `&` reference as mutable
18+
//[classic2024]~^ ERROR: cannot borrow data in a `&` reference as mutable
1919
let _: &u32 = x;
2020
}
2121

2222
let &[x] = &&mut [0];
23-
//[classic]~^ ERROR: cannot borrow data in a `&` reference as mutable
23+
//[classic2024]~^ ERROR: cannot borrow data in a `&` reference as mutable
2424
let _: &u32 = x;
2525

2626
let [&x] = &[&mut 0];
27-
//[classic]~^ ERROR: cannot move out of type
27+
//[classic2024]~^ ERROR: cannot move out of type
2828
let _: &u32 = x;
2929

3030
let [&x] = &mut [&mut 0];
31-
//[classic]~^ ERROR: cannot move out of type
31+
//[classic2024]~^ ERROR: cannot move out of type
3232
let _: &u32 = x;
3333

3434
let [&mut x] = &mut [&mut 0];
35-
//[classic]~^ ERROR: cannot move out of type
35+
//[classic2024]~^ ERROR: cannot move out of type
3636
let _: &mut u32 = x;
3737
}

tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/cannot-mutably-deref-shared-ref.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@ edition: 2024
2-
//@ revisions: classic structural
2+
//@ revisions: classic2024 structural2024
33
//! Test that `&mut` patterns don't match shared reference types under new typing rules in Rust 2024
44
#![allow(incomplete_features)]
5-
#![cfg_attr(classic, feature(ref_pat_eat_one_layer_2024))]
6-
#![cfg_attr(structural, feature(ref_pat_eat_one_layer_2024_structural))]
5+
#![cfg_attr(classic2024, feature(ref_pat_eat_one_layer_2024))]
6+
#![cfg_attr(structural2024, feature(ref_pat_eat_one_layer_2024_structural))]
77

88
pub fn main() {
99
let &mut _ = &&0;

tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/mut-ref-mut.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@ edition: 2024
2-
//@ revisions: classic structural
2+
//@ revisions: classic2024 structural2024
33
//! Test diagnostics for binding with `mut` when the default binding mode is by-ref.
44
#![allow(incomplete_features)]
5-
#![cfg_attr(classic, feature(ref_pat_eat_one_layer_2024))]
6-
#![cfg_attr(structural, feature(ref_pat_eat_one_layer_2024_structural))]
5+
#![cfg_attr(classic2024, feature(ref_pat_eat_one_layer_2024))]
6+
#![cfg_attr(structural2024, feature(ref_pat_eat_one_layer_2024_structural))]
77

88
pub fn main() {
99
struct Foo(u8);

0 commit comments

Comments
 (0)