fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.1 KiB83 linesraw
1error[E0277]: the size for values of type `T` cannot be known at compilation time
2  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:3:16
3   |
4LL | fn foo<T>(foo: Wrapper<T>)
5   |        -       ^^^^^^^^^^ doesn't have a size known at compile-time
6   |        |
7   |        this type parameter needs to be `Sized`
8   |
9note: required by a bound in `Wrapper`
10  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
11   |
12LL | struct Wrapper<T>(T);
13   |                ^ required by this bound in `Wrapper`
14help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
15  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
16   |
17LL | struct Wrapper<T>(T);
18   |                ^  - ...if indirection were used here: `Box<T>`
19   |                |
20   |                this could be changed to `T: ?Sized`...
21help: consider removing the `?Sized` bound to make the type parameter `Sized`
22   |
23LL - where
24LL -     T
25LL -     :
26LL -     ?
27LL -     Sized
28   |
29
30error[E0277]: the size for values of type `T` cannot be known at compilation time
31  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:14:16
32   |
33LL | fn bar<T>(foo: Wrapper<T>)
34   |        -       ^^^^^^^^^^ doesn't have a size known at compile-time
35   |        |
36   |        this type parameter needs to be `Sized`
37   |
38note: required by a bound in `Wrapper`
39  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
40   |
41LL | struct Wrapper<T>(T);
42   |                ^ required by this bound in `Wrapper`
43help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
44  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
45   |
46LL | struct Wrapper<T>(T);
47   |                ^  - ...if indirection were used here: `Box<T>`
48   |                |
49   |                this could be changed to `T: ?Sized`...
50help: consider removing the `?Sized` bound to make the type parameter `Sized`
51   |
52LL - where T: ?Sized
53   |
54
55error[E0277]: the size for values of type `T` cannot be known at compilation time
56  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:21:16
57   |
58LL | fn qux<T>(foo: Wrapper<T>)
59   |        -       ^^^^^^^^^^ doesn't have a size known at compile-time
60   |        |
61   |        this type parameter needs to be `Sized`
62   |
63note: required by a bound in `Wrapper`
64  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
65   |
66LL | struct Wrapper<T>(T);
67   |                ^ required by this bound in `Wrapper`
68help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
69  --> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
70   |
71LL | struct Wrapper<T>(T);
72   |                ^  - ...if indirection were used here: `Box<T>`
73   |                |
74   |                this could be changed to `T: ?Sized`...
75help: consider removing the `?Sized` bound to make the type parameter `Sized`
76   |
77LL - where
78LL -     T: ?Sized
79   |
80
81error: aborting due to 3 previous errors
82
83For more information about this error, try `rustc --explain E0277`.