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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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>
30 LL - let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
31 LL + let _: Box<dyn (Obj) + (?Sized) + (for<'a> Trait<'a>)>;
34 error[E0225]: only auto traits can be used as additional traits in a trait object
35 --> $DIR/trait-object-trait-parens.rs:8:35
37 LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
38 | ----- ^^^^^^^^^^^^^^^^^^^ additional non-auto trait
40 | first non-auto trait
42 = 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> {}`
43 = 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>
45 warning: trait objects without an explicit `dyn` are deprecated
46 --> $DIR/trait-object-trait-parens.rs:13:16
48 LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
52 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
55 LL - let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
56 LL + let _: Box<dyn ?Sized + (for<'a> Trait<'a>) + (Obj)>;
59 error[E0225]: only auto traits can be used as additional traits in a trait object
60 --> $DIR/trait-object-trait-parens.rs:13:47
62 LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
63 | ------------------- ^^^^^ additional non-auto trait
65 | first non-auto trait
67 = 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 {}`
68 = 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>
70 warning: trait objects without an explicit `dyn` are deprecated
71 --> $DIR/trait-object-trait-parens.rs:18:16
73 LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
77 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
80 LL - let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
81 LL + let _: Box<dyn for<'a> Trait<'a> + (Obj) + (?Sized)>;
84 error[E0225]: only auto traits can be used as additional traits in a trait object
85 --> $DIR/trait-object-trait-parens.rs:18:36
87 LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
88 | ----------------- ^^^^^ additional non-auto trait
90 | first non-auto trait
92 = 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 {}`
93 = 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>
95 error: aborting due to 6 previous errors; 3 warnings emitted
97 For more information about this error, try `rustc --explain E0225`.