2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:14:19
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | enum E where i32: Foo { V }
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[warn(trivial_bounds)]` on by default
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:16:21
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | struct S where i32: Foo;
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:18:20
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | trait T where i32: Foo {}
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:20:20
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | union U where i32: Foo { f: i32 }
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
warning: where clauses are not enforced in type aliases
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:22:14
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | type Y where i32: Foo = ();
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[warn(type_alias_bounds)]` on by default
|
2019-10-28 18:58:27 -05:00
|
|
|
help: the clause will not be checked when the type alias is used, and should be removed
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - type Y where i32: Foo = ();
|
|
|
|
LL + type Y = ();
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:22:19
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | type Y where i32: Foo = ();
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:26:28
|
2018-09-16 12:15:49 -05:00
|
|
|
|
|
|
|
|
LL | impl Foo for () where i32: Foo {
|
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Foo does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:34:19
|
2018-09-16 12:15:49 -05:00
|
|
|
|
|
|
|
|
LL | fn f() where i32: Foo {
|
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:41:28
|
2018-09-16 12:15:49 -05:00
|
|
|
|
|
|
|
|
LL | fn g() where &'static str: Foo {
|
|
|
|
| ^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound str: Sized does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:55:37
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | struct TwoStrs(str, str) where str: Sized;
|
2018-09-16 12:15:49 -05:00
|
|
|
| ^^^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:57:51
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
|
|
|
|
| ^^^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound str: Sized does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:61:35
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
2018-09-16 12:15:49 -05:00
|
|
|
LL | fn return_str() -> str where str: Sized {
|
|
|
|
| ^^^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound String: Neg does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:65:46
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
2018-09-16 12:15:49 -05:00
|
|
|
LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2021-10-03 01:53:02 -05:00
|
|
|
warning: trait bound i32: Iterator does not depend on any type or lifetime parameters
|
2019-11-05 18:00:00 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent.rs:70:25
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
2018-09-16 12:15:49 -05:00
|
|
|
LL | fn use_for() where i32: Iterator {
|
|
|
|
| ^^^^^^^^
|
2018-05-06 16:54:00 -05:00
|
|
|
|
2020-03-11 10:30:09 -05:00
|
|
|
warning: 14 warnings emitted
|
|
|
|
|