diff options
| author | dianne <diannes.gm@gmail.com> | 2025-02-19 00:50:31 -0800 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-02-19 01:43:38 -0800 |
| commit | 51a2ee3252b33d31574ad0d03766e1b7a4034812 (patch) | |
| tree | 789cb85c045a720898a117f6fa1623b3d7a58a29 /tests | |
| parent | ef6df3b7135a0f70e83e840b6d6256709504b022 (diff) | |
| download | rust-51a2ee3252b33d31574ad0d03766e1b7a4034812.tar.gz rust-51a2ee3252b33d31574ad0d03766e1b7a4034812.zip | |
don't get trapped inside of expansions when trimming labels
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr index eb76615aac1..6efda4f757f 100644 --- a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr +++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr @@ -581,12 +581,10 @@ LL | let &[migration_lint_macros::bind_ref!(a)] = &[0]; | + error: reference patterns may only be written when the default binding mode is `move` in Rust 2024 - --> $DIR/auxiliary/migration_lint_macros.rs:15:22 + --> $DIR/migration_lint.rs:249:10 | -LL | ($foo:ident) => { - | ______________________^ -LL | | ref $foo - | |________________^ reference pattern not allowed under `ref` default binding mode +LL | let [&migration_lint_macros::bind_ref!(a)] = &[&0]; + | ^ reference pattern not allowed under `ref` default binding mode | = warning: this changes meaning in Rust 2024 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html> @@ -596,7 +594,6 @@ note: matching on a reference type with a non-reference pattern changes the defa LL | let [&migration_lint_macros::bind_ref!(a)] = &[&0]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this matches on type `&_` help: make the implied reference pattern explicit - --> $DIR/migration_lint.rs:249:9 | LL | let &[&migration_lint_macros::bind_ref!(a)] = &[&0]; | + |
