]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-inconsistent.stderr
CommitLineData
c295e0f8 1warning: trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 2 --> $DIR/trivial-bounds-inconsistent.rs:14:19
94b46f34
XL
3 |
4LL | enum E where i32: Foo { V }
0bf4aa26 5 | ^^^
94b46f34 6 |
416331ca 7 = note: `#[warn(trivial_bounds)]` on by default
94b46f34 8
c295e0f8 9warning: trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 10 --> $DIR/trivial-bounds-inconsistent.rs:16:21
94b46f34
XL
11 |
12LL | struct S where i32: Foo;
0bf4aa26 13 | ^^^
94b46f34 14
c295e0f8 15warning: trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 16 --> $DIR/trivial-bounds-inconsistent.rs:18:20
94b46f34
XL
17 |
18LL | trait T where i32: Foo {}
0bf4aa26 19 | ^^^
94b46f34 20
c295e0f8 21warning: trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 22 --> $DIR/trivial-bounds-inconsistent.rs:20:20
94b46f34
XL
23 |
24LL | union U where i32: Foo { f: i32 }
0bf4aa26 25 | ^^^
94b46f34
XL
26
27warning: where clauses are not enforced in type aliases
0731742a 28 --> $DIR/trivial-bounds-inconsistent.rs:22:14
94b46f34
XL
29 |
30LL | type Y where i32: Foo = ();
31 | ^^^^^^^^
32 |
416331ca 33 = note: `#[warn(type_alias_bounds)]` on by default
e74abb32
XL
34help: the clause will not be checked when the type alias is used, and should be removed
35 |
94222f64
XL
36LL - type Y where i32: Foo = ();
37LL + type Y = ();
923072b8 38 |
94b46f34 39
c295e0f8 40warning: trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 41 --> $DIR/trivial-bounds-inconsistent.rs:22:19
94b46f34
XL
42 |
43LL | type Y where i32: Foo = ();
0bf4aa26 44 | ^^^
94b46f34 45
c295e0f8 46warning: trait bound i32: Foo does not depend on any type or lifetime parameters
60c5eb7d 47 --> $DIR/trivial-bounds-inconsistent.rs:26:28
0bf4aa26
XL
48 |
49LL | impl Foo for () where i32: Foo {
50 | ^^^
94b46f34 51
c295e0f8 52warning: trait bound i32: Foo does not depend on any type or lifetime parameters
60c5eb7d 53 --> $DIR/trivial-bounds-inconsistent.rs:34:19
0bf4aa26
XL
54 |
55LL | fn f() where i32: Foo {
56 | ^^^
94b46f34 57
c295e0f8 58warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
60c5eb7d 59 --> $DIR/trivial-bounds-inconsistent.rs:41:28
0bf4aa26
XL
60 |
61LL | fn g() where &'static str: Foo {
62 | ^^^
94b46f34 63
c295e0f8 64warning: trait bound str: Sized does not depend on any type or lifetime parameters
60c5eb7d 65 --> $DIR/trivial-bounds-inconsistent.rs:55:37
94b46f34
XL
66 |
67LL | struct TwoStrs(str, str) where str: Sized;
0bf4aa26 68 | ^^^^^
94b46f34 69
c295e0f8 70warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters
60c5eb7d 71 --> $DIR/trivial-bounds-inconsistent.rs:57:51
94b46f34 72 |
dc9dc135
XL
73LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
74 | ^^^^^
94b46f34 75
c295e0f8 76warning: trait bound str: Sized does not depend on any type or lifetime parameters
60c5eb7d 77 --> $DIR/trivial-bounds-inconsistent.rs:61:35
94b46f34 78 |
0bf4aa26
XL
79LL | fn return_str() -> str where str: Sized {
80 | ^^^^^
94b46f34 81
c295e0f8 82warning: trait bound String: Neg does not depend on any type or lifetime parameters
60c5eb7d 83 --> $DIR/trivial-bounds-inconsistent.rs:65:46
94b46f34 84 |
0bf4aa26
XL
85LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94b46f34 87
c295e0f8 88warning: trait bound i32: Iterator does not depend on any type or lifetime parameters
60c5eb7d 89 --> $DIR/trivial-bounds-inconsistent.rs:70:25
94b46f34 90 |
0bf4aa26
XL
91LL | fn use_for() where i32: Iterator {
92 | ^^^^^^^^
94b46f34 93
ba9703b0
XL
94warning: 14 warnings emitted
95