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