1 error: `?Trait` is not permitted in trait object types
2 --> $DIR/trait-object-trait-parens.rs:8:24
4 LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
7 error: `?Trait` is not permitted in trait object types
8 --> $DIR/trait-object-trait-parens.rs:13:16
10 LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
13 error: `?Trait` is not permitted in trait object types
14 --> $DIR/trait-object-trait-parens.rs:18:44
16 LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
19 warning: trait objects without an explicit `dyn` are deprecated
20 --> $DIR/trait-object-trait-parens.rs:8:16
22 LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Obj) + (?Sized) + (for<'a> Trait<'a>)`
25 = note: `#[warn(bare_trait_objects)]` on by default
26 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
27 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
29 warning: trait objects without an explicit `dyn` are deprecated
30 --> $DIR/trait-object-trait-parens.rs:13:16
32 LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ?Sized + (for<'a> Trait<'a>) + (Obj)`
35 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
36 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
38 warning: trait objects without an explicit `dyn` are deprecated
39 --> $DIR/trait-object-trait-parens.rs:18:16
41 LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn for<'a> Trait<'a> + (Obj) + (?Sized)`
44 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
45 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
47 error[E0225]: only auto traits can be used as additional traits in a trait object
48 --> $DIR/trait-object-trait-parens.rs:8:35
50 LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
51 | ----- ^^^^^^^^^^^^^^^^^^^ additional non-auto trait
53 | first non-auto trait
55 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + for<'a> Trait<'a> {}`
56 = 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>
58 error[E0225]: only auto traits can be used as additional traits in a trait object
59 --> $DIR/trait-object-trait-parens.rs:13:47
61 LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
62 | ------------------- ^^^^^ additional non-auto trait
64 | first non-auto trait
66 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
67 = 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>
69 error[E0225]: only auto traits can be used as additional traits in a trait object
70 --> $DIR/trait-object-trait-parens.rs:18:36
72 LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
73 | ----------------- ^^^^^ additional non-auto trait
75 | first non-auto trait
77 = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: for<'a> Trait<'a> + Obj {}`
78 = 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>
80 error: aborting due to 6 previous errors; 3 warnings emitted
82 For more information about this error, try `rustc --explain E0225`.