summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/feature-gates')
-rw-r--r--tests/ui/feature-gates/feature-gate-associated_type_bounds.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr40
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.rs9
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs35
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr45
-rw-r--r--tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs12
-rw-r--r--tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr57
-rw-r--r--tests/ui/feature-gates/feature-gate-non_lifetime_binders.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr6
-rw-r--r--tests/ui/feature-gates/feature-gate-trivial_bounds.stderr2
13 files changed, 212 insertions, 29 deletions
diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs b/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
index 4e0203274..49fb10e60 100644
--- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
+++ b/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs
@@ -1,6 +1,3 @@
-// compile-flags: -Zsave-analysis
-// This is also a regression test for #69415 and the above flag is needed.
-
use std::mem::ManuallyDrop;
trait Tr1 { type As1: Copy; }
diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
index 5be1d97a0..4233a8af9 100644
--- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr
@@ -1,5 +1,5 @@
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:15:22
+ --> $DIR/feature-gate-associated_type_bounds.rs:12:22
|
LL | type A: Iterator<Item: Copy>;
| ^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | type A: Iterator<Item: Copy>;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:19:22
+ --> $DIR/feature-gate-associated_type_bounds.rs:16:22
|
LL | type B: Iterator<Item: 'static>;
| ^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL | type B: Iterator<Item: 'static>;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:23:20
+ --> $DIR/feature-gate-associated_type_bounds.rs:20:20
|
LL | struct _St1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
@@ -26,7 +26,7 @@ LL | struct _St1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:30:18
+ --> $DIR/feature-gate-associated_type_bounds.rs:27:18
|
LL | enum _En1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
@@ -35,7 +35,7 @@ LL | enum _En1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:37:19
+ --> $DIR/feature-gate-associated_type_bounds.rs:34:19
|
LL | union _Un1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
@@ -44,7 +44,7 @@ LL | union _Un1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:44:37
+ --> $DIR/feature-gate-associated_type_bounds.rs:41:37
|
LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
| ^^^^^^^^^^
@@ -53,7 +53,7 @@ LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:47:22
+ --> $DIR/feature-gate-associated_type_bounds.rs:44:22
|
LL | fn _apit(_: impl Tr1<As1: Copy>) {}
| ^^^^^^^^^
@@ -62,7 +62,7 @@ LL | fn _apit(_: impl Tr1<As1: Copy>) {}
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:49:26
+ --> $DIR/feature-gate-associated_type_bounds.rs:46:26
|
LL | fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
| ^^^^^^^^^
@@ -71,7 +71,7 @@ LL | fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:52:24
+ --> $DIR/feature-gate-associated_type_bounds.rs:49:24
|
LL | fn _rpit() -> impl Tr1<As1: Copy> { S1 }
| ^^^^^^^^^
@@ -80,7 +80,7 @@ LL | fn _rpit() -> impl Tr1<As1: Copy> { S1 }
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:55:31
+ --> $DIR/feature-gate-associated_type_bounds.rs:52:31
|
LL | fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
| ^^^^^^^^^
@@ -89,7 +89,7 @@ LL | fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:58:23
+ --> $DIR/feature-gate-associated_type_bounds.rs:55:23
|
LL | const _cdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
@@ -98,7 +98,7 @@ LL | const _cdef: impl Tr1<As1: Copy> = S1;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:64:24
+ --> $DIR/feature-gate-associated_type_bounds.rs:61:24
|
LL | static _sdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
@@ -107,7 +107,7 @@ LL | static _sdef: impl Tr1<As1: Copy> = S1;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
error[E0658]: associated type bounds are unstable
- --> $DIR/feature-gate-associated_type_bounds.rs:71:21
+ --> $DIR/feature-gate-associated_type_bounds.rs:68:21
|
LL | let _: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
@@ -115,26 +115,26 @@ LL | let _: impl Tr1<As1: Copy> = S1;
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/feature-gate-associated_type_bounds.rs:58:14
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in const types
+ --> $DIR/feature-gate-associated_type_bounds.rs:55:14
|
LL | const _cdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
- --> $DIR/feature-gate-associated_type_bounds.rs:64:15
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in const types
+ --> $DIR/feature-gate-associated_type_bounds.rs:61:15
|
LL | static _sdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
- --> $DIR/feature-gate-associated_type_bounds.rs:71:12
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable bindings
+ --> $DIR/feature-gate-associated_type_bounds.rs:68:12
|
LL | let _: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `<<Self as _Tr3>::A as Iterator>::Item: Copy` is not satisfied
- --> $DIR/feature-gate-associated_type_bounds.rs:15:28
+ --> $DIR/feature-gate-associated_type_bounds.rs:12:28
|
LL | type A: Iterator<Item: Copy>;
| ^^^^ the trait `Copy` is not implemented for `<<Self as _Tr3>::A as Iterator>::Item`
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.rs b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.rs
new file mode 100644
index 000000000..83366ea02
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.rs
@@ -0,0 +1,9 @@
+// Check that even though Cell: DispatchFromDyn it remains an invalid self parameter type
+
+use std::cell::Cell;
+
+trait Trait{
+ fn cell(self: Cell<&Self>); //~ ERROR invalid `self` parameter type: Cell<&Self>
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr
new file mode 100644
index 000000000..ce06ce916
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-cell.stderr
@@ -0,0 +1,12 @@
+error[E0307]: invalid `self` parameter type: Cell<&Self>
+ --> $DIR/feature-gate-dispatch-from-dyn-cell.rs:6:19
+ |
+LL | fn cell(self: Cell<&Self>);
+ | ^^^^^^^^^^^
+ |
+ = note: type of `self` must be `Self` or a type that dereferences to it
+ = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0307`.
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
new file mode 100644
index 000000000..23857cbac
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.rs
@@ -0,0 +1,35 @@
+// Check that a self parameter type requires a DispatchFromDyn impl to be object safe
+
+#![feature(arbitrary_self_types, unsize, coerce_unsized)]
+
+use std::{
+ marker::Unsize,
+ ops::{CoerceUnsized, Deref},
+};
+
+struct Ptr<T: ?Sized>(Box<T>);
+
+impl<T: ?Sized> Deref for Ptr<T> {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ &*self.0
+ }
+}
+
+impl<T: Unsize<U> + ?Sized, U: ?Sized> CoerceUnsized<Ptr<U>> for Ptr<T> {}
+// Because this impl is missing the coercion below fails.
+// impl<T: Unsize<U> + ?Sized, U: ?Sized> DispatchFromDyn<Ptr<U>> for Ptr<T> {}
+
+trait Trait {
+ fn ptr(self: Ptr<Self>);
+}
+impl Trait for i32 {
+ fn ptr(self: Ptr<Self>) {}
+}
+
+fn main() {
+ Ptr(Box::new(4)) as Ptr<dyn Trait>;
+ //~^ ERROR the trait `Trait` cannot be made into an object
+ //~^^ ERROR the trait `Trait` cannot be made into an object
+}
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
new file mode 100644
index 000000000..d81eade8e
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
@@ -0,0 +1,45 @@
+error[E0038]: the trait `Trait` cannot be made into an object
+ --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:25
+ |
+LL | fn ptr(self: Ptr<Self>);
+ | --------- help: consider changing method `ptr`'s `self` parameter to be `&self`: `&Self`
+...
+LL | Ptr(Box::new(4)) as Ptr<dyn Trait>;
+ | ^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+ |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+ --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18
+ |
+LL | trait Trait {
+ | ----- this trait cannot be made into an object...
+LL | fn ptr(self: Ptr<Self>);
+ | ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
+
+error[E0038]: the trait `Trait` cannot be made into an object
+ --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:5
+ |
+LL | fn ptr(self: Ptr<Self>);
+ | --------- help: consider changing method `ptr`'s `self` parameter to be `&self`: `&Self`
+...
+LL | Ptr(Box::new(4)) as Ptr<dyn Trait>;
+ | ^^^^^^^^^^^^^^^^ `Trait` cannot be made into an object
+ |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+ --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:25:18
+ |
+LL | trait Trait {
+ | ----- this trait cannot be made into an object...
+LL | fn ptr(self: Ptr<Self>);
+ | ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
+note: required for `Ptr<{integer}>` to implement `CoerceUnsized<Ptr<dyn Trait>>`
+ --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:20:40
+ |
+LL | impl<T: Unsize<U> + ?Sized, U: ?Sized> CoerceUnsized<Ptr<U>> for Ptr<T> {}
+ | --------- ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^
+ | |
+ | unsatisfied trait bound introduced here
+ = note: required by cast to type `Ptr<dyn Trait>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
index 760dcb615..c8c3e13d7 100644
--- a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
+++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
@@ -1,4 +1,4 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return types
--> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:1:24
|
LL | fn f() -> impl Fn() -> impl Sized { || () }
@@ -7,7 +7,7 @@ LL | fn f() -> impl Fn() -> impl Sized { || () }
= note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information
= help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return types
--> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32
|
LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
diff --git a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs
new file mode 100644
index 000000000..0467dea62
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs
@@ -0,0 +1,12 @@
+// check-pass
+
+#![deny(multiple_supertrait_upcastable)]
+//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
+//~| WARNING unknown lint: `multiple_supertrait_upcastable`
+//~| WARNING unknown lint: `multiple_supertrait_upcastable`
+#![warn(multiple_supertrait_upcastable)]
+//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
+//~| WARNING unknown lint: `multiple_supertrait_upcastable`
+//~| WARNING unknown lint: `multiple_supertrait_upcastable`
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr
new file mode 100644
index 000000000..1f725f354
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr
@@ -0,0 +1,57 @@
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
+ |
+LL | #![deny(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+ = note: `#[warn(unknown_lints)]` on by default
+
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
+ |
+LL | #![warn(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
+ |
+LL | #![deny(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
+ |
+LL | #![warn(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
+ |
+LL | #![deny(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+
+warning: unknown lint: `multiple_supertrait_upcastable`
+ --> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
+ |
+LL | #![warn(multiple_supertrait_upcastable)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: the `multiple_supertrait_upcastable` lint is unstable
+ = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.rs b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.rs
new file mode 100644
index 000000000..221e9133f
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.rs
@@ -0,0 +1,4 @@
+fn foo() where for<T> T:, {}
+//~^ ERROR only lifetime parameters can be used in this context
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr
new file mode 100644
index 000000000..01c8ee30c
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr
@@ -0,0 +1,12 @@
+error[E0658]: only lifetime parameters can be used in this context
+ --> $DIR/feature-gate-non_lifetime_binders.rs:1:20
+ |
+LL | fn foo() where for<T> T:, {}
+ | ^
+ |
+ = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+ = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr b/tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr
index aeabed4a6..0082b6faf 100644
--- a/tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr
+++ b/tests/ui/feature-gates/feature-gate-return_position_impl_trait_in_trait.stderr
@@ -1,4 +1,4 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
--> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:8:17
|
LL | fn bar() -> impl Sized;
@@ -7,7 +7,7 @@ LL | fn bar() -> impl Sized;
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/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
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
--> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:9:21
|
LL | fn baz() -> Box<impl std::fmt::Display>;
@@ -16,7 +16,7 @@ LL | fn baz() -> Box<impl std::fmt::Display>;
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/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
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
--> $DIR/feature-gate-return_position_impl_trait_in_trait.rs:15:23
|
LL | async fn bar() -> impl Sized;
diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
index 1b87ebd9f..d2ad372df 100644
--- a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
+++ b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
@@ -95,7 +95,7 @@ LL | fn unsized_local() where Dst<dyn A>: Sized {
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
-note: required because it appears within the type `Dst<(dyn A + 'static)>`
+note: required because it appears within the type `Dst<dyn A>`
--> $DIR/feature-gate-trivial_bounds.rs:48:8
|
LL | struct Dst<X: ?Sized> {