From 7a3211726bb101ab0c0138b2dcff44a175ff74c4 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Sun, 14 Apr 2024 13:33:11 -0400 Subject: [PATCH] Fix tests --- tests/ui/pattern/mut_preserve_binding_mode_2021.rs | 1 + tests/ui/pattern/mut_preserve_binding_mode_2021.stderr | 4 ++-- tests/ui/pattern/mut_preserve_binding_mode_2024.rs | 2 +- tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2021.rs b/tests/ui/pattern/mut_preserve_binding_mode_2021.rs index 658ba2851cc..befa49fdc24 100644 --- a/tests/ui/pattern/mut_preserve_binding_mode_2021.rs +++ b/tests/ui/pattern/mut_preserve_binding_mode_2021.rs @@ -1,6 +1,7 @@ //@ edition: 2021 //@ compile-flags: -Zunstable-options #![feature(mut_preserve_binding_mode_2024)] +#![allow(incomplete_features)] struct Foo(u8); diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr b/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr index 9487aa64b4f..b800cc4a0f4 100644 --- a/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr +++ b/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr @@ -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 diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024.rs b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs index a5d7ac9d8e6..5454962e16c 100644 --- a/tests/ui/pattern/mut_preserve_binding_mode_2024.rs +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs @@ -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); diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs index d3e3ffffcc5..249f251d2cd 100644 --- a/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs @@ -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);