]> git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
Update upstream source from tag 'upstream/1.40.0+dfsg1'
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-inconsistent.stderr
1 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
2 --> $DIR/trivial-bounds-inconsistent.rs:14:19
3 |
4 LL | enum E where i32: Foo { V }
5 | ^^^
6 |
7 = note: `#[warn(trivial_bounds)]` on by default
8
9 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
10 --> $DIR/trivial-bounds-inconsistent.rs:16:21
11 |
12 LL | struct S where i32: Foo;
13 | ^^^
14
15 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
16 --> $DIR/trivial-bounds-inconsistent.rs:18:20
17 |
18 LL | trait T where i32: Foo {}
19 | ^^^
20
21 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
22 --> $DIR/trivial-bounds-inconsistent.rs:20:20
23 |
24 LL | union U where i32: Foo { f: i32 }
25 | ^^^
26
27 warning: where clauses are not enforced in type aliases
28 --> $DIR/trivial-bounds-inconsistent.rs:22:14
29 |
30 LL | 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 |
36 LL | type Y = ();
37 | --
38
39 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
40 --> $DIR/trivial-bounds-inconsistent.rs:22:19
41 |
42 LL | type Y where i32: Foo = ();
43 | ^^^
44
45 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
46 --> $DIR/trivial-bounds-inconsistent.rs:24:28
47 |
48 LL | impl Foo for () where i32: Foo {
49 | ^^^
50
51 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
52 --> $DIR/trivial-bounds-inconsistent.rs:32:19
53 |
54 LL | fn f() where i32: Foo {
55 | ^^^
56
57 warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters
58 --> $DIR/trivial-bounds-inconsistent.rs:39:28
59 |
60 LL | fn g() where &'static str: Foo {
61 | ^^^
62
63 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
64 --> $DIR/trivial-bounds-inconsistent.rs:53:37
65 |
66 LL | struct TwoStrs(str, str) where str: Sized;
67 | ^^^^^
68
69 warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
70 --> $DIR/trivial-bounds-inconsistent.rs:55:51
71 |
72 LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
73 | ^^^^^
74
75 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
76 --> $DIR/trivial-bounds-inconsistent.rs:59:35
77 |
78 LL | fn return_str() -> str where str: Sized {
79 | ^^^^^
80
81 warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters
82 --> $DIR/trivial-bounds-inconsistent.rs:63:46
83 |
84 LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86
87 warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters
88 --> $DIR/trivial-bounds-inconsistent.rs:67:25
89 |
90 LL | fn use_for() where i32: Iterator {
91 | ^^^^^^^^
92