fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
3.4 KiB74 linesraw
1error: `?Trait` is not permitted in trait object types
2  --> $DIR/trait-object-trait-parens.rs:8:24
3   |
4LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
5   |                        ^^^^^^^^
6
7error: `?Trait` is not permitted in trait object types
8  --> $DIR/trait-object-trait-parens.rs:12:17
9   |
10LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
11   |                 ^^^^^^
12
13error: `?Trait` is not permitted in trait object types
14  --> $DIR/trait-object-trait-parens.rs:16:46
15   |
16LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
17   |                                              ^^^^^^^^
18
19warning: trait objects without an explicit `dyn` are deprecated
20  --> $DIR/trait-object-trait-parens.rs:8:16
21   |
22LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
23   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Obj) + (?Sized) + (for<'a> Trait<'a>)`
24   |
25   = note: `#[warn(bare_trait_objects)]` on by default
26
27warning: trait objects without an explicit `dyn` are deprecated
28  --> $DIR/trait-object-trait-parens.rs:12:16
29   |
30LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
31   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Obj)`
32
33warning: trait objects without an explicit `dyn` are deprecated
34  --> $DIR/trait-object-trait-parens.rs:16:16
35   |
36LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
37   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Obj) + (?Sized)`
38
39error[E0225]: only auto traits can be used as additional traits in a trait object
40  --> $DIR/trait-object-trait-parens.rs:8:35
41   |
42LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
43   |                -----              ^^^^^^^^^^^^^^^^^^^
44   |                |                  |
45   |                |                  additional non-auto trait
46   |                |                  trait alias used in trait object type (additional use)
47   |                first non-auto trait
48   |                trait alias used in trait object type (first use)
49
50error[E0225]: only auto traits can be used as additional traits in a trait object
51  --> $DIR/trait-object-trait-parens.rs:12:49
52   |
53LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
54   |                           -------------------   ^^^^^
55   |                           |                     |
56   |                           |                     additional non-auto trait
57   |                           |                     trait alias used in trait object type (additional use)
58   |                           first non-auto trait
59   |                           trait alias used in trait object type (first use)
60
61error[E0225]: only auto traits can be used as additional traits in a trait object
62  --> $DIR/trait-object-trait-parens.rs:16:38
63   |
64LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
65   |                 -----------------    ^^^^^
66   |                 |                    |
67   |                 |                    additional non-auto trait
68   |                 |                    trait alias used in trait object type (additional use)
69   |                 first non-auto trait
70   |                 trait alias used in trait object type (first use)
71
72error: aborting due to 6 previous errors; 3 warnings emitted
73
74For more information about this error, try `rustc --explain E0225`.