5b54286640
Remove the "which is required by `{root_obligation}`" post-script in "the trait `X` is not implemented for `Y`" explanation in E0277. This information is already conveyed in the notes explaining requirements, making it redundant while making the text (particularly in labels) harder to read. ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ``` vs the prior ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ```
151 lines
5.1 KiB
Plaintext
151 lines
5.1 KiB
Plaintext
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:10:14
|
|
|
|
|
LL | enum E where i32: Foo { V }
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:12:16
|
|
|
|
|
LL | struct S where i32: Foo;
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:14:15
|
|
|
|
|
LL | trait T where i32: Foo {}
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:16:15
|
|
|
|
|
LL | union U where i32: Foo { f: i32 }
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:20:23
|
|
|
|
|
LL | impl Foo for () where i32: Foo {
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `i32: Foo` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:28:14
|
|
|
|
|
LL | fn f() where i32: Foo
|
|
| ^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
|
|
|
|
= help: the trait `Foo` is implemented for `()`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the trait bound `String: Neg` is not satisfied
|
|
--> $DIR/feature-gate-trivial_bounds.rs:36:38
|
|
|
|
|
LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Neg` is not implemented for `String`
|
|
|
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: `i32` is not an iterator
|
|
--> $DIR/feature-gate-trivial_bounds.rs:40:20
|
|
|
|
|
LL | fn use_for() where i32: Iterator {
|
|
| ^^^^^^^^^^^^^ `i32` is not an iterator
|
|
|
|
|
= help: the trait `Iterator` is not implemented for `i32`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
--> $DIR/feature-gate-trivial_bounds.rs:52:32
|
|
|
|
|
LL | struct TwoStrs(str, str) where str: Sized;
|
|
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
|
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
|
|
--> $DIR/feature-gate-trivial_bounds.rs:55:26
|
|
|
|
|
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)>`
|
|
--> $DIR/feature-gate-trivial_bounds.rs:48:8
|
|
|
|
|
LL | struct Dst<X: ?Sized> {
|
|
| ^^^
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
--> $DIR/feature-gate-trivial_bounds.rs:59:30
|
|
|
|
|
LL | fn return_str() -> str where str: Sized {
|
|
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
|
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
|
= help: see issue #48214
|
|
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(trivial_bounds)]
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|