]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-inconsistent.stderr
CommitLineData
94b46f34 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
XL
6 |
7 = note: #[warn(trivial_bounds)] on by default
8
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
XL
14
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
XL
20
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 |
33 = note: #[warn(type_alias_bounds)] on by default
34 = help: the clause will not be checked when the type alias is used, and should be removed
35
36warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 37 --> $DIR/trivial-bounds-inconsistent.rs:22:19
94b46f34
XL
38 |
39LL | type Y where i32: Foo = ();
0bf4aa26 40 | ^^^
94b46f34
XL
41
42warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 43 --> $DIR/trivial-bounds-inconsistent.rs:24:28
0bf4aa26
XL
44 |
45LL | impl Foo for () where i32: Foo {
46 | ^^^
94b46f34
XL
47
48warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
0731742a 49 --> $DIR/trivial-bounds-inconsistent.rs:32:19
0bf4aa26
XL
50 |
51LL | fn f() where i32: Foo {
52 | ^^^
94b46f34
XL
53
54warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters
0731742a 55 --> $DIR/trivial-bounds-inconsistent.rs:39:28
0bf4aa26
XL
56 |
57LL | fn g() where &'static str: Foo {
58 | ^^^
94b46f34
XL
59
60warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
0731742a 61 --> $DIR/trivial-bounds-inconsistent.rs:53:37
94b46f34
XL
62 |
63LL | struct TwoStrs(str, str) where str: Sized;
0bf4aa26 64 | ^^^^^
94b46f34 65
8faf50e0 66warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
0731742a 67 --> $DIR/trivial-bounds-inconsistent.rs:55:47
94b46f34 68 |
0bf4aa26
XL
69LL | fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
70 | ^^^^^
94b46f34
XL
71
72warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
0731742a 73 --> $DIR/trivial-bounds-inconsistent.rs:59:35
94b46f34 74 |
0bf4aa26
XL
75LL | fn return_str() -> str where str: Sized {
76 | ^^^^^
94b46f34
XL
77
78warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters
0731742a 79 --> $DIR/trivial-bounds-inconsistent.rs:63:46
94b46f34 80 |
0bf4aa26
XL
81LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94b46f34
XL
83
84warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters
0731742a 85 --> $DIR/trivial-bounds-inconsistent.rs:67:25
94b46f34 86 |
0bf4aa26
XL
87LL | fn use_for() where i32: Iterator {
88 | ^^^^^^^^
94b46f34 89