]> git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds-inconsistent-copy.stderr
New upstream version 1.28.0~beta.14+dfsg1
[rustc.git] / src / test / ui / trivial-bounds-inconsistent-copy.stderr
1 warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters
2 --> $DIR/trivial-bounds-inconsistent-copy.rs:16:1
3 |
4 LL | / fn copy_string(t: String) -> String where String: Copy {
5 LL | | is_copy(&t);
6 LL | | let x = t;
7 LL | | drop(t);
8 LL | | t
9 LL | | }
10 | |_^
11 |
12 = note: #[warn(trivial_bounds)] on by default
13
14 warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters
15 --> $DIR/trivial-bounds-inconsistent-copy.rs:23:1
16 |
17 LL | / fn copy_out_string(t: &String) -> String where String: Copy {
18 LL | | *t
19 LL | | }
20 | |_^
21
22 warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters
23 --> $DIR/trivial-bounds-inconsistent-copy.rs:27:1
24 |
25 LL | / fn copy_string_with_param<T>(x: String) where String: Copy {
26 LL | | let y = x;
27 LL | | let z = x;
28 LL | | }
29 | |_^
30
31 warning: Trait bound for<'b> &'b mut i32: std::marker::Copy does not depend on any type or lifetime parameters
32 --> $DIR/trivial-bounds-inconsistent-copy.rs:33:1
33 |
34 LL | / fn copy_mut<'a>(t: &&'a mut i32) -> &'a mut i32 where for<'b> &'b mut i32: Copy {
35 LL | | is_copy(t);
36 LL | | let x = *t;
37 LL | | drop(x);
38 LL | | x
39 LL | | }
40 | |_^
41