From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/feature-gates/bench.stderr | 2 +- src/test/ui/feature-gates/feature-gate-asm_sym.rs | 19 ------------------- .../ui/feature-gates/feature-gate-asm_sym.stderr | 21 --------------------- ...ure-gate-default_type_parameter_fallback.stderr | 2 +- ...ate-non_exhaustive_omitted_patterns_lint.stderr | 2 +- .../ui/feature-gates/feature-gate-repr-simd.stderr | 2 +- ...ure-gate-return_position_impl_trait_in_trait.rs | 13 +++++++++++++ ...gate-return_position_impl_trait_in_trait.stderr | 22 ++++++++++++++++++++-- .../feature-gate-strict_provenance.stderr | 2 +- .../feature-gate-test_unstable_lint.stderr | 2 +- ...ssue-43106-gating-of-builtin-attrs-error.stderr | 2 +- 11 files changed, 40 insertions(+), 49 deletions(-) delete mode 100644 src/test/ui/feature-gates/feature-gate-asm_sym.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-asm_sym.stderr (limited to 'src/test/ui/feature-gates') diff --git a/src/test/ui/feature-gates/bench.stderr b/src/test/ui/feature-gates/bench.stderr index 168ac9257..5f0aaf925 100644 --- a/src/test/ui/feature-gates/bench.stderr +++ b/src/test/ui/feature-gates/bench.stderr @@ -4,9 +4,9 @@ error: use of unstable library feature 'test': `bench` is a part of custom test LL | #[bench] | ^^^^^ | - = note: `#[deny(soft_unstable)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #64266 + = note: `#[deny(soft_unstable)]` on by default error: use of unstable library feature 'test': `bench` is a part of custom test frameworks which are unstable --> $DIR/bench.rs:7:5 diff --git a/src/test/ui/feature-gates/feature-gate-asm_sym.rs b/src/test/ui/feature-gates/feature-gate-asm_sym.rs deleted file mode 100644 index 0de6b3abb..000000000 --- a/src/test/ui/feature-gates/feature-gate-asm_sym.rs +++ /dev/null @@ -1,19 +0,0 @@ -// only-x86_64 - -use std::arch::asm; - -fn bar() {} - -fn foo() { - unsafe { - asm!("mov eax, {}", sym bar::); - //~^ ERROR sym operands for inline assembly are unstable - } -} - -fn main() { - unsafe { - asm!("mov eax, {}", sym foo::<0>); - //~^ ERROR sym operands for inline assembly are unstable - } -} diff --git a/src/test/ui/feature-gates/feature-gate-asm_sym.stderr b/src/test/ui/feature-gates/feature-gate-asm_sym.stderr deleted file mode 100644 index d4b16f60b..000000000 --- a/src/test/ui/feature-gates/feature-gate-asm_sym.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0658]: sym operands for inline assembly are unstable - --> $DIR/feature-gate-asm_sym.rs:9:29 - | -LL | asm!("mov eax, {}", sym bar::); - | ^^^^^^^^^^^^ - | - = note: see issue #93333 for more information - = help: add `#![feature(asm_sym)]` to the crate attributes to enable - -error[E0658]: sym operands for inline assembly are unstable - --> $DIR/feature-gate-asm_sym.rs:16:29 - | -LL | asm!("mov eax, {}", sym foo::<0>); - | ^^^^^^^^^^^^ - | - = note: see issue #93333 for more information - = help: add `#![feature(asm_sym)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr index a7d5c7ac3..308de2692 100644 --- a/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr +++ b/src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr @@ -4,9 +4,9 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type` LL | fn avg(_: T) {} | ^^^^^ | - = note: `#[deny(invalid_type_param_default)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 + = note: `#[deny(invalid_type_param_default)]` on by default error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions --> $DIR/feature-gate-default_type_parameter_fallback.rs:8:6 diff --git a/src/test/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr b/src/test/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr index 3de08e215..4d79ce3c6 100644 --- a/src/test/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr +++ b/src/test/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr @@ -4,10 +4,10 @@ warning: unknown lint: `non_exhaustive_omitted_patterns` LL | #![deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unknown_lints)]` on by default = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `non_exhaustive_omitted_patterns` --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:6:1 diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr index ae44b8020..5b1270a19 100644 --- a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr @@ -25,9 +25,9 @@ LL | LL | #[repr(simd)] | ^^^^ | - = note: `#[deny(conflicting_repr_hints)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 + = note: `#[deny(conflicting_repr_hints)]` on by default error: aborting due to 3 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.rs b/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.rs index de7966c66..637765fff 100644 --- a/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.rs +++ b/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.rs @@ -1,5 +1,18 @@ +// edition:2021 + +// async_fn_in_trait is not enough to allow use of RPITIT +#![allow(incomplete_features)] +#![feature(async_fn_in_trait)] + trait Foo { fn bar() -> impl Sized; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return + fn baz() -> Box; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return +} + +// Both return_position_impl_trait_in_trait and async_fn_in_trait are required for this (see also +// feature-gate-async_fn_in_trait.rs) +trait AsyncFoo { + async fn bar() -> impl Sized; //~ ERROR `impl Trait` only allowed in function and inherent method return types, not in trait method return } fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr b/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr index 36177bbe1..aeabed4a6 100644 --- a/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr +++ b/src/test/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr @@ -1,5 +1,5 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return - --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:2:17 + --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:8:17 | LL | fn bar() -> impl Sized; | ^^^^^^^^^^ @@ -7,6 +7,24 @@ LL | fn bar() -> impl Sized; = note: see issue #91611 for more information = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable -error: aborting due to previous error +error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return + --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:9:21 + | +LL | fn baz() -> Box; + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #91611 for more information + = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable + +error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return + --> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:15:23 + | +LL | async fn bar() -> impl Sized; + | ^^^^^^^^^^ + | + = note: see issue #91611 for more information + = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable + +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0562`. diff --git a/src/test/ui/feature-gates/feature-gate-strict_provenance.stderr b/src/test/ui/feature-gates/feature-gate-strict_provenance.stderr index 34bd240c3..751da87cc 100644 --- a/src/test/ui/feature-gates/feature-gate-strict_provenance.stderr +++ b/src/test/ui/feature-gates/feature-gate-strict_provenance.stderr @@ -4,10 +4,10 @@ warning: unknown lint: `fuzzy_provenance_casts` LL | #![deny(fuzzy_provenance_casts)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unknown_lints)]` on by default = note: the `fuzzy_provenance_casts` lint is unstable = note: see issue #95228 for more information = help: add `#![feature(strict_provenance)]` to the crate attributes to enable + = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `lossy_provenance_casts` --> $DIR/feature-gate-strict_provenance.rs:7:1 diff --git a/src/test/ui/feature-gates/feature-gate-test_unstable_lint.stderr b/src/test/ui/feature-gates/feature-gate-test_unstable_lint.stderr index a29322443..b4d6aa658 100644 --- a/src/test/ui/feature-gates/feature-gate-test_unstable_lint.stderr +++ b/src/test/ui/feature-gates/feature-gate-test_unstable_lint.stderr @@ -4,9 +4,9 @@ warning: unknown lint: `test_unstable_lint` LL | #![allow(test_unstable_lint)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unknown_lints)]` on by default = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable + = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `test_unstable_lint` --> $DIR/feature-gate-test_unstable_lint.rs:4:1 diff --git a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index f94ec7d47..5a645cf4e 100644 --- a/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -12,9 +12,9 @@ error: attribute must be of the form `#[inline]` or `#[inline(always|never)]` LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^^^^ | - = note: `#[deny(ill_formed_attribute_input)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 + = note: `#[deny(ill_formed_attribute_input)]` on by default error: `start` attribute can only be used on functions --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:1 -- cgit v1.2.3