Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Apr 16, 2024
1 parent 1b6d435 commit 7a32117
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/ui/pattern/mut_preserve_binding_mode_2021.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ edition: 2021
//@ compile-flags: -Zunstable-options
#![feature(mut_preserve_binding_mode_2024)]
#![allow(incomplete_features)]

struct Foo(u8);

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/pattern/mut_preserve_binding_mode_2021.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/mut_preserve_binding_mode_2021.rs:9:9
--> $DIR/mut_preserve_binding_mode_2021.rs:10:9
|
LL | let Foo(mut a) = &Foo(0);
| ----- expected due to the type of this binding
Expand All @@ -13,7 +13,7 @@ LL + a = 42;
|

error[E0308]: mismatched types
--> $DIR/mut_preserve_binding_mode_2021.rs:13:9
--> $DIR/mut_preserve_binding_mode_2021.rs:14:9
|
LL | let Foo(mut a) = &mut Foo(0);
| ----- expected due to the type of this binding
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/pattern/mut_preserve_binding_mode_2024.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@ edition: 2024
//@ compile-flags: -Zunstable-options
#![feature(mut_preserve_binding_mode_2024)]
#![allow(unused)]
#![allow(incomplete_features, unused)]

struct Foo(u8);

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ edition: 2021
#![feature(mut_preserve_binding_mode_2024)]
#![allow(unused)]
#![allow(incomplete_features, unused)]
#![forbid(dereferencing_mut_binding)]

struct Foo(u8);
Expand Down

0 comments on commit 7a32117

Please sign in to comment.