diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
commit | 94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch) | |
tree | 2b827afe6a05f3538db3f7803a88c4587fe85648 /src/test/ui/rust-2021 | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip |
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/rust-2021')
11 files changed, 48 insertions, 62 deletions
diff --git a/src/test/ui/rust-2021/array-into-iter-ambiguous.stderr b/src/test/ui/rust-2021/array-into-iter-ambiguous.stderr index fac8d21c7..2a724bd30 100644 --- a/src/test/ui/rust-2021/array-into-iter-ambiguous.stderr +++ b/src/test/ui/rust-2021/array-into-iter-ambiguous.stderr @@ -4,13 +4,13 @@ warning: trait method `into_iter` will become ambiguous in Rust 2021 LL | let y = points.into_iter(); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `MyIntoIter::into_iter(points)` | + = warning: this changes meaning in Rust 2021 + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html> note: the lint level is defined here --> $DIR/array-into-iter-ambiguous.rs:5:9 | LL | #![warn(array_into_iter)] | ^^^^^^^^^^^^^^^ - = warning: this changes meaning in Rust 2021 - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/IntoIterator-for-arrays.html> warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/future-prelude-collision-generic-trait.stderr b/src/test/ui/rust-2021/future-prelude-collision-generic-trait.stderr index 14ad9b017..f38da132b 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-generic-trait.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-generic-trait.stderr @@ -4,13 +4,13 @@ warning: trait-associated function `try_from` will become ambiguous in Rust 2021 LL | U::try_from(self) | ^^^^^^^^^^^ help: disambiguate the associated function: `<U as PyTryFrom<'_, _>>::try_from` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision-generic-trait.rs:5:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/future-prelude-collision-generic.stderr b/src/test/ui/rust-2021/future-prelude-collision-generic.stderr index e1d3f3c0a..9893b3eba 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-generic.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-generic.stderr @@ -4,13 +4,13 @@ warning: trait-associated function `from_iter` will become ambiguous in Rust 202 LL | Generic::from_iter(1); | ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Generic<'_, _> as MyFromIter>::from_iter` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision-generic.rs:5:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: trait-associated function `from_iter` will become ambiguous in Rust 2021 --> $DIR/future-prelude-collision-generic.rs:31:5 diff --git a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr index 56abb8abd..c1d72d0df 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-imported.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-imported.stderr @@ -4,13 +4,13 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(3u8)` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision-imported.rs:4:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: trait method `try_into` will become ambiguous in Rust 2021 --> $DIR/future-prelude-collision-imported.rs:40:22 diff --git a/src/test/ui/rust-2021/future-prelude-collision-macros.stderr b/src/test/ui/rust-2021/future-prelude-collision-macros.stderr index 4c3543ca7..4d4a07699 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-macros.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-macros.stderr @@ -4,13 +4,13 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | foo!().try_into(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `MyTry::try_into(foo!(), todo!())` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision-macros.rs:4:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: trait-associated function `try_from` will become ambiguous in Rust 2021 --> $DIR/future-prelude-collision-macros.rs:42:5 diff --git a/src/test/ui/rust-2021/future-prelude-collision-turbofish.stderr b/src/test/ui/rust-2021/future-prelude-collision-turbofish.stderr index 2de9020bc..c0ef80fd8 100644 --- a/src/test/ui/rust-2021/future-prelude-collision-turbofish.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision-turbofish.stderr @@ -4,13 +4,13 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | x.try_into::<usize>().or(Err("foo"))?.checked_sub(1); | ^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `AnnotatableTryInto::try_into::<usize>(x)` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision-turbofish.rs:6:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: trait method `try_into` will become ambiguous in Rust 2021 --> $DIR/future-prelude-collision-turbofish.rs:23:5 diff --git a/src/test/ui/rust-2021/future-prelude-collision.stderr b/src/test/ui/rust-2021/future-prelude-collision.stderr index 889e66de0..cae113ff7 100644 --- a/src/test/ui/rust-2021/future-prelude-collision.stderr +++ b/src/test/ui/rust-2021/future-prelude-collision.stderr @@ -4,13 +4,13 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | let _: u32 = 3u8.try_into().unwrap(); | ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(3u8)` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/future-prelude-collision.rs:4:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: trait-associated function `try_from` will become ambiguous in Rust 2021 --> $DIR/future-prelude-collision.rs:61:13 diff --git a/src/test/ui/rust-2021/generic-type-collision.stderr b/src/test/ui/rust-2021/generic-type-collision.stderr index e6ea28d71..1ec61044f 100644 --- a/src/test/ui/rust-2021/generic-type-collision.stderr +++ b/src/test/ui/rust-2021/generic-type-collision.stderr @@ -4,13 +4,13 @@ warning: trait-associated function `from_iter` will become ambiguous in Rust 202 LL | <Vec<i32>>::from_iter(None); | ^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Vec<i32> as MyTrait<_>>::from_iter` | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/generic-type-collision.rs:4:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/inherent-dyn-collision.stderr b/src/test/ui/rust-2021/inherent-dyn-collision.stderr index 77b4c3851..f5905574a 100644 --- a/src/test/ui/rust-2021/inherent-dyn-collision.stderr +++ b/src/test/ui/rust-2021/inherent-dyn-collision.stderr @@ -4,13 +4,13 @@ warning: trait method `try_into` will become ambiguous in Rust 2021 LL | get_dyn_trait().try_into().unwrap() | ^^^^^^^^^^^^^^^ help: disambiguate the method call: `(&*get_dyn_trait())` | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> note: the lint level is defined here --> $DIR/inherent-dyn-collision.rs:8:9 | LL | #![warn(rust_2021_prelude_collisions)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html> warning: 1 warning emitted diff --git a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr index 647a9f393..20914d1b9 100644 --- a/src/test/ui/rust-2021/reserved-prefixes-migration.stderr +++ b/src/test/ui/rust-2021/reserved-prefixes-migration.stderr @@ -4,18 +4,17 @@ warning: prefix `z` is unknown LL | m2!(z"hey"); | ^ unknown prefix | + = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> note: the lint level is defined here --> $DIR/reserved-prefixes-migration.rs:5:9 | LL | #![warn(rust_2021_prefixes_incompatible_syntax)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! - = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL - m2!(z"hey"); -LL + m2!(z "hey"); - | +LL | m2!(z "hey"); + | + warning: prefix `prefix` is unknown --> $DIR/reserved-prefixes-migration.rs:19:9 @@ -27,9 +26,8 @@ LL | m2!(prefix"hey"); = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL - m2!(prefix"hey"); -LL + m2!(prefix "hey"); - | +LL | m2!(prefix "hey"); + | + warning: prefix `hey` is unknown --> $DIR/reserved-prefixes-migration.rs:22:9 @@ -41,9 +39,8 @@ LL | m3!(hey#123); = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL - m3!(hey#123); -LL + m3!(hey #123); - | +LL | m3!(hey #123); + | + warning: prefix `hey` is unknown --> $DIR/reserved-prefixes-migration.rs:25:9 @@ -55,9 +52,8 @@ LL | m3!(hey#hey); = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL - m3!(hey#hey); -LL + m3!(hey #hey); - | +LL | m3!(hey #hey); + | + warning: prefix `kind` is unknown --> $DIR/reserved-prefixes-migration.rs:35:14 @@ -69,9 +65,8 @@ LL | #name = #kind#value = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html> help: insert whitespace here to avoid this being parsed as a prefix in Rust 2021 | -LL - #name = #kind#value -LL + #name = #kind #value - | +LL | #name = #kind #value + | + warning: 5 warnings emitted diff --git a/src/test/ui/rust-2021/reserved-prefixes.stderr b/src/test/ui/rust-2021/reserved-prefixes.stderr index df31aee66..807d6d98b 100644 --- a/src/test/ui/rust-2021/reserved-prefixes.stderr +++ b/src/test/ui/rust-2021/reserved-prefixes.stderr @@ -7,9 +7,8 @@ LL | demo3!(foo#bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo3!(foo#bar); -LL + demo3!(foo #bar); - | +LL | demo3!(foo #bar); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:17:12 @@ -20,9 +19,8 @@ LL | demo2!(foo"bar"); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo2!(foo"bar"); -LL + demo2!(foo "bar"); - | +LL | demo2!(foo "bar"); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:18:12 @@ -33,9 +31,8 @@ LL | demo2!(foo'b'); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo2!(foo'b'); -LL + demo2!(foo 'b'); - | +LL | demo2!(foo 'b'); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:20:12 @@ -46,9 +43,8 @@ LL | demo2!(foo'b); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo2!(foo'b); -LL + demo2!(foo 'b); - | +LL | demo2!(foo 'b); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:21:12 @@ -59,9 +55,8 @@ LL | demo3!(foo# bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo3!(foo# bar); -LL + demo3!(foo # bar); - | +LL | demo3!(foo # bar); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:22:12 @@ -72,9 +67,8 @@ LL | demo4!(foo#! bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo4!(foo#! bar); -LL + demo4!(foo #! bar); - | +LL | demo4!(foo #! bar); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:23:12 @@ -85,9 +79,8 @@ LL | demo4!(foo## bar); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo4!(foo## bar); -LL + demo4!(foo ## bar); - | +LL | demo4!(foo ## bar); + | + error: prefix `foo` is unknown --> $DIR/reserved-prefixes.rs:25:12 @@ -98,9 +91,8 @@ LL | demo4!(foo#bar#); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo4!(foo#bar#); -LL + demo4!(foo #bar#); - | +LL | demo4!(foo #bar#); + | + error: prefix `bar` is unknown --> $DIR/reserved-prefixes.rs:25:16 @@ -111,9 +103,8 @@ LL | demo4!(foo#bar#); = note: prefixed identifiers and literals are reserved since Rust 2021 help: consider inserting whitespace here | -LL - demo4!(foo#bar#); -LL + demo4!(foo#bar #); - | +LL | demo4!(foo#bar #); + | + error: aborting due to 9 previous errors |