You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add tests differing between stable and new rules (with errors on new rules)
Since there are so many ways to write these, I've opted to only include
two sorts of test: simple tests that directly target the rules differing
between rulesets and nuanced tests that produce different errors under
different rulesets. I've also tried not to add any duplicate tests.
`well-typed-edition-2024.rs` already has tests disagreeing with stable,
so I've opted not to include any in this commit that are well-typed
under the new rules.
Copy file name to clipboardExpand all lines: tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/ref-binding-on-inh-ref-errors.stable2021.stderr
+11-4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
error[E0308]: mismatched types
2
-
--> $DIR/ref-binding-on-inh-ref-errors.rs:46:10
2
+
--> $DIR/ref-binding-on-inh-ref-errors.rs:43:10
3
3
|
4
4
LL | let [&ref x] = &[&mut 0];
5
5
| ^^^^^^ --------- this expression has type `&[&mut {integer}; 1]`
@@ -15,7 +15,7 @@ LL + let [ref x] = &[&mut 0];
15
15
|
16
16
17
17
error[E0308]: mismatched types
18
-
--> $DIR/ref-binding-on-inh-ref-errors.rs:53:10
18
+
--> $DIR/ref-binding-on-inh-ref-errors.rs:50:10
19
19
|
20
20
LL | let [&ref x] = &mut [&mut 0];
21
21
| ^^^^^^ ------------- this expression has type `&mut [&mut {integer}; 1]`
Copy file name to clipboardExpand all lines: tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/ref-binding-on-inh-ref-errors.structural2024.stderr
+74-7
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
error: this pattern relies on behavior which may change in edition 2024
2
-
--> $DIR/ref-binding-on-inh-ref-errors.rs:16:11
2
+
--> $DIR/ref-binding-on-inh-ref-errors.rs:15:11
3
3
|
4
4
LL | let [&ref x] = &[&0];
5
5
| ^^^ cannot override to bind by-reference when that is the implicit default
@@ -11,7 +11,7 @@ LL | let &[&ref x] = &[&0];
11
11
| +
12
12
13
13
error: this pattern relies on behavior which may change in edition 2024
14
-
--> $DIR/ref-binding-on-inh-ref-errors.rs:22:11
14
+
--> $DIR/ref-binding-on-inh-ref-errors.rs:21:11
15
15
|
16
16
LL | let [&ref x] = &mut [&0];
17
17
| ^^^ cannot override to bind by-reference when that is the implicit default
0 commit comments