rust/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr

90 lines
3.2 KiB
Plaintext
Raw Normal View History

2018-05-06 21:54:00 +00:00
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:24:19
2018-05-06 21:54:00 +00:00
|
LL | enum E where i32: Foo { V }
| ^^^
2018-05-06 21:54:00 +00:00
|
= note: #[warn(trivial_bounds)] on by default
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:26:21
2018-05-06 21:54:00 +00:00
|
LL | struct S where i32: Foo;
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:28:20
2018-05-06 21:54:00 +00:00
|
LL | trait T where i32: Foo {}
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:30:20
2018-05-06 21:54:00 +00:00
|
LL | union U where i32: Foo { f: i32 }
| ^^^
2018-05-06 21:54:00 +00:00
warning: where clauses are not enforced in type aliases
--> $DIR/trivial-bounds-inconsistent.rs:32:14
|
LL | type Y where i32: Foo = ();
| ^^^^^^^^
|
= note: #[warn(type_alias_bounds)] on by default
= help: the clause will not be checked when the type alias is used, and should be removed
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:32:19
2018-05-06 21:54:00 +00:00
|
LL | type Y where i32: Foo = ();
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:34:28
|
LL | impl Foo for () where i32: Foo {
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:42:19
|
LL | fn f() where i32: Foo {
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:49:28
|
LL | fn g() where &'static str: Foo {
| ^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:63:37
2018-05-06 21:54:00 +00:00
|
LL | struct TwoStrs(str, str) where str: Sized;
| ^^^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:65:47
2018-05-06 21:54:00 +00:00
|
LL | fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
| ^^^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:69:35
2018-05-06 21:54:00 +00:00
|
LL | fn return_str() -> str where str: Sized {
| ^^^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:73:46
2018-05-06 21:54:00 +00:00
|
LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-05-06 21:54:00 +00:00
warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:77:25
2018-05-06 21:54:00 +00:00
|
LL | fn use_for() where i32: Iterator {
| ^^^^^^^^
2018-05-06 21:54:00 +00:00