@@ -38,7 +38,7 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
3838 --> $DIR/feature-gate-trivial_bounds.rs:30:1
3939 |
4040LL | / impl Foo for () where i32: Foo { //~ ERROR
41- LL | | fn test(&self) {
41+ LL | | fn test(&self) { //~ ERROR
4242LL | | 3i32.test();
4343LL | | Foo::test(&4i32);
4444LL | | generic_function(5i32);
@@ -97,8 +97,17 @@ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
9797 = help: see issue #48214
9898 = help: add #![feature(trivial_bounds)] to the crate attributes to enable
9999
100+ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
101+ --> $DIR/feature-gate-trivial_bounds.rs:62:16
102+ |
103+ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
104+ | ^^^ `str` does not have a constant size known at compile-time
105+ |
106+ = help: the trait `std::marker::Sized` is not implemented for `str`
107+ = note: only the last field of a struct may have a dynamically sized type
108+
100109error[E0277]: the trait bound `A + 'static: std::marker::Sized` is not satisfied in `Dst<A + 'static>`
101- --> $DIR/feature-gate-trivial_bounds.rs:64 :1
110+ --> $DIR/feature-gate-trivial_bounds.rs:65 :1
102111 |
103112LL | / fn unsized_local() where Dst<A>: Sized { //~ ERROR
104113LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
@@ -111,7 +120,7 @@ LL | | }
111120 = help: add #![feature(trivial_bounds)] to the crate attributes to enable
112121
113122error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
114- --> $DIR/feature-gate-trivial_bounds.rs:68 :1
123+ --> $DIR/feature-gate-trivial_bounds.rs:69 :1
115124 |
116125LL | / fn return_str() -> str where str: Sized { //~ ERROR
117126LL | | *"Sized".to_string().into_boxed_str()
@@ -122,6 +131,22 @@ LL | | }
122131 = help: see issue #48214
123132 = help: add #![feature(trivial_bounds)] to the crate attributes to enable
124133
125- error: aborting due to 11 previous errors
134+ error[E0277]: the trait bound `i32: Foo` is not satisfied
135+ --> $DIR/feature-gate-trivial_bounds.rs:31:5
136+ |
137+ LL | / fn test(&self) { //~ ERROR
138+ LL | | 3i32.test();
139+ LL | | Foo::test(&4i32);
140+ LL | | generic_function(5i32);
141+ LL | | }
142+ | |_____^ the trait `Foo` is not implemented for `i32`
143+ |
144+ note: required by `Foo`
145+ --> $DIR/feature-gate-trivial_bounds.rs:14:1
146+ |
147+ LL | pub trait Foo {
148+ | ^^^^^^^^^^^^^
149+
150+ error: aborting due to 13 previous errors
126151
127152For more information about this error, try `rustc --explain E0277`.
0 commit comments