]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trait-object-trait-parens.stderr
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / parser / trait-object-trait-parens.stderr
1 error: `?Trait` is not permitted in trait object types
2   --> $DIR/trait-object-trait-parens.rs:8:24
3    |
4 LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
5    |                        ^^^^^^^^
6
7 error: `?Trait` is not permitted in trait object types
8   --> $DIR/trait-object-trait-parens.rs:12:17
9    |
10 LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
11    |                 ^^^^^^
12
13 error: `?Trait` is not permitted in trait object types
14   --> $DIR/trait-object-trait-parens.rs:16:46
15    |
16 LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
17    |                                              ^^^^^^^^
18
19 warning: trait objects without an explicit `dyn` are deprecated
20   --> $DIR/trait-object-trait-parens.rs:8:16
21    |
22 LL |     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
27 warning: trait objects without an explicit `dyn` are deprecated
28   --> $DIR/trait-object-trait-parens.rs:12:16
29    |
30 LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
31    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Obj)`
32
33 warning: trait objects without an explicit `dyn` are deprecated
34   --> $DIR/trait-object-trait-parens.rs:16:16
35    |
36 LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
37    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Obj) + (?Sized)`
38
39 error[E0225]: only auto traits can be used as additional traits in a trait object
40   --> $DIR/trait-object-trait-parens.rs:8:35
41    |
42 LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
43    |                -----              ^^^^^^^^^^^^^^^^^^^ additional non-auto trait
44    |                |
45    |                first non-auto trait
46    |
47    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + for<'a> Trait<'a> {}`
48    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
49
50 error[E0225]: only auto traits can be used as additional traits in a trait object
51   --> $DIR/trait-object-trait-parens.rs:12:49
52    |
53 LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>;
54    |                           -------------------   ^^^^^ additional non-auto trait
55    |                           |
56    |                           first non-auto trait
57    |
58    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
59    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
60
61 error[E0225]: only auto traits can be used as additional traits in a trait object
62   --> $DIR/trait-object-trait-parens.rs:16:38
63    |
64 LL |     let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>;
65    |                 -----------------    ^^^^^ additional non-auto trait
66    |                 |
67    |                 first non-auto trait
68    |
69    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
70    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
71
72 error: aborting due to 6 previous errors; 3 warnings emitted
73
74 For more information about this error, try `rustc --explain E0225`.