rust/src/test/ui/feature-gate-trivial_bounds.stderr

128 lines
4.8 KiB
Plaintext
Raw Normal View History

2018-05-06 16:50:35 -05:00
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:20:1
|
LL | enum E where i32: Foo { V } //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:22:1
|
LL | struct S where i32: Foo; //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:24:1
|
LL | trait T where i32: Foo {} //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:26:1
|
LL | union U where i32: Foo { f: i32 } //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:30:1
|
LL | / impl Foo for () where i32: Foo { //~ ERROR
LL | | fn test(&self) {
2018-05-06 16:50:35 -05:00
LL | | 3i32.test();
LL | | Foo::test(&4i32);
LL | | generic_function(5i32);
LL | | }
LL | | }
| |_^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:38:1
|
LL | / fn f() where i32: Foo //~ ERROR
LL | | {
LL | | let s = S;
LL | | 3i32.test();
LL | | Foo::test(&4i32);
LL | | generic_function(5i32);
LL | | }
| |_^ the trait `Foo` is not implemented for `i32`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:46:1
|
LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { //~ ERROR
LL | | -s
LL | | }
| |_^ the trait `std::ops::Neg` is not implemented for `std::string::String`
|
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: the trait bound `i32: std::iter::Iterator` is not satisfied
--> $DIR/feature-gate-trivial_bounds.rs:50:1
|
LL | / fn use_for() where i32: Iterator { //~ ERROR
LL | | for _ in 2i32 {}
LL | | }
| |_^ `i32` is not an iterator; maybe try calling `.iter()` or a similar method
|
= help: the trait `std::iter::Iterator` is not implemented for `i32`
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: `str` does not have a constant size known at compile-time
2018-05-06 16:50:35 -05:00
--> $DIR/feature-gate-trivial_bounds.rs:62:1
|
LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `str` does not have a constant size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: `A + 'static` does not have a constant size known at compile-time
--> $DIR/feature-gate-trivial_bounds.rs:65:1
2018-05-06 16:50:35 -05:00
|
LL | / fn unsized_local() where Dst<A>: Sized { //~ ERROR
LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
LL | | }
| |_^ `A + 'static` does not have a constant size known at compile-time
|
= help: within `Dst<A + 'static>`, the trait `std::marker::Sized` is not implemented for `A + 'static`
= note: required because it appears within the type `Dst<A + 'static>`
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error[E0277]: `str` does not have a constant size known at compile-time
--> $DIR/feature-gate-trivial_bounds.rs:69:1
2018-05-06 16:50:35 -05:00
|
LL | / fn return_str() -> str where str: Sized { //~ ERROR
LL | | *"Sized".to_string().into_boxed_str()
LL | | }
| |_^ `str` does not have a constant size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= help: see issue #48214
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
error: aborting due to 11 previous errors
2018-05-06 16:50:35 -05:00
For more information about this error, try `rustc --explain E0277`.