]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
New upstream version 1.30.0+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-inconsistent.stderr
CommitLineData
94b46f34
XL
1warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
2 --> $DIR/trivial-bounds-inconsistent.rs:24:1
3 |
4LL | enum E where i32: Foo { V }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: #[warn(trivial_bounds)] on by default
8
9warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
10 --> $DIR/trivial-bounds-inconsistent.rs:26:1
11 |
12LL | struct S where i32: Foo;
13 | ^^^^^^^^^^^^^^^^^^^^^^^^
14
15warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
16 --> $DIR/trivial-bounds-inconsistent.rs:28:1
17 |
18LL | trait T where i32: Foo {}
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
20
21warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
22 --> $DIR/trivial-bounds-inconsistent.rs:30:1
23 |
24LL | union U where i32: Foo { f: i32 }
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
27warning: where clauses are not enforced in type aliases
28 --> $DIR/trivial-bounds-inconsistent.rs:32:14
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
37 --> $DIR/trivial-bounds-inconsistent.rs:32:1
38 |
39LL | type Y where i32: Foo = ();
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
42warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
43 --> $DIR/trivial-bounds-inconsistent.rs:34:1
44 |
45LL | / impl Foo for () where i32: Foo {
46LL | | fn test(&self) {
47LL | | 3i32.test();
48LL | | Foo::test(&4i32);
49LL | | generic_function(5i32);
50LL | | }
51LL | | }
52 | |_^
53
54warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
55 --> $DIR/trivial-bounds-inconsistent.rs:42:1
56 |
57LL | / fn f() where i32: Foo {
58LL | | let s = S;
59LL | | 3i32.test();
60LL | | Foo::test(&4i32);
61LL | | generic_function(5i32);
62LL | | }
63 | |_^
64
65warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters
66 --> $DIR/trivial-bounds-inconsistent.rs:49:1
67 |
68LL | / fn g() where &'static str: Foo {
69LL | | "Foo".test();
70LL | | Foo::test(&"Foo");
71LL | | generic_function("Foo");
72LL | | }
73 | |_^
74
75warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
76 --> $DIR/trivial-bounds-inconsistent.rs:63:1
77 |
78LL | struct TwoStrs(str, str) where str: Sized;
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
8faf50e0 81warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters
94b46f34
XL
82 --> $DIR/trivial-bounds-inconsistent.rs:65:1
83 |
84LL | / fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
85LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
86LL | | }
87 | |_^
88
89warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
90 --> $DIR/trivial-bounds-inconsistent.rs:69:1
91 |
92LL | / fn return_str() -> str where str: Sized {
93LL | | *"Sized".to_string().into_boxed_str()
94LL | | }
95 | |_^
96
97warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters
98 --> $DIR/trivial-bounds-inconsistent.rs:73:1
99 |
100LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
101LL | | -s
102LL | | }
103 | |_^
104
105warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters
106 --> $DIR/trivial-bounds-inconsistent.rs:77:1
107 |
108LL | / fn use_for() where i32: Iterator {
109LL | | for _ in 2i32 {}
110LL | | }
111 | |_^
112