1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:14:19
|
LL | enum E where i32: Foo { V }
| ^^^
|
= 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:16:21
|
LL | struct S where i32: Foo;
| ^^^
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:18:20
|
LL | trait T where i32: Foo {}
| ^^^
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:20:20
|
LL | union U where i32: Foo { f: i32 }
| ^^^
warning: where clauses on type aliases are not enforced
--> $DIR/trivial-bounds-inconsistent.rs:22:14
|
LL | type Y where i32: Foo = ();
| ------^^^^^^^^
| | |
| | will not be checked at usage sites of the type alias
| help: remove this where clause
|
= note: this is a known limitation of the type checker that may be lifted in a future edition.
see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
= help: add `#![feature(lazy_type_alias)]` to the crate attributes to enable the desired semantics
= note: `#[warn(type_alias_bounds)]` on by default
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:22:19
|
LL | type Y where i32: Foo = ();
| ^^^
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:26:28
|
LL | impl Foo for () where i32: Foo {
| ^^^
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:34:19
|
LL | fn f() where i32: Foo {
| ^^^
warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:41:28
|
LL | fn g() where &'static str: Foo {
| ^^^
warning: trait bound str: Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:55:37
|
LL | struct TwoStrs(str, str) where str: Sized;
| ^^^^^
warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:57:51
|
LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
| ^^^^^
warning: trait bound str: Sized does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:61:35
|
LL | fn return_str() -> str where str: Sized {
| ^^^^^
warning: trait bound String: Neg does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:65:46
|
LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: trait bound i32: Iterator does not depend on any type or lifetime parameters
--> $DIR/trivial-bounds-inconsistent.rs:70:25
|
LL | fn use_for() where i32: Iterator {
| ^^^^^^^^
warning: 14 warnings emitted
|