Fix tests

This commit is contained in:
Jules Bertholet 2024-04-14 13:33:11 -04:00
parent 1b6d435cf3
commit 7a3211726b
No known key found for this signature in database
GPG key ID: 32034DAFC38C1BFC
4 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,7 @@
//@ edition: 2021
//@ compile-flags: -Zunstable-options
#![feature(mut_preserve_binding_mode_2024)]
#![allow(incomplete_features)]
struct Foo(u8);

View file

@ -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
@ -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

View file

@ -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);

View file

@ -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);