提交 058a21d5 编写于 作者: B Bruce Mitchener

Consistently use 'supertrait'.

A subset of places referred to 'super-trait', so this changes them
to all use 'supertrait'. This matches 'supertype' and some other
usages. An exception is 'auto-trait' which is consistently used
in that manner.
上级 c02371c4
...@@ -88,7 +88,7 @@ trait PrinterSupport: pprust::PpAnn { ...@@ -88,7 +88,7 @@ trait PrinterSupport: pprust::PpAnn {
/// Produces the pretty-print annotation object. /// Produces the pretty-print annotation object.
/// ///
/// (Rust does not yet support upcasting from a trait object to /// (Rust does not yet support upcasting from a trait object to
/// an object for one of its super-traits.) /// an object for one of its supertraits.)
fn pp_ann(&self) -> &dyn pprust::PpAnn; fn pp_ann(&self) -> &dyn pprust::PpAnn;
} }
...@@ -104,7 +104,7 @@ trait HirPrinterSupport<'hir>: pprust_hir::PpAnn { ...@@ -104,7 +104,7 @@ trait HirPrinterSupport<'hir>: pprust_hir::PpAnn {
/// Produces the pretty-print annotation object. /// Produces the pretty-print annotation object.
/// ///
/// (Rust does not yet support upcasting from a trait object to /// (Rust does not yet support upcasting from a trait object to
/// an object for one of its super-traits.) /// an object for one of its supertraits.)
fn pp_ann(&self) -> &dyn pprust_hir::PpAnn; fn pp_ann(&self) -> &dyn pprust_hir::PpAnn;
} }
......
...@@ -16,9 +16,9 @@ pub trait BoxCar : Box + Vehicle {} ...@@ -16,9 +16,9 @@ pub trait BoxCar : Box + Vehicle {}
fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {} // Invalid constraint fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {} // Invalid constraint
``` ```
In this example, `BoxCar` has two super-traits: `Vehicle` and `Box`. Both of In this example, `BoxCar` has two supertraits: `Vehicle` and `Box`. Both of
these traits define an associated type `Color`. `BoxCar` inherits two types these traits define an associated type `Color`. `BoxCar` inherits two types
with that name from both super-traits. Because of this, we need to use the with that name from both supertraits. Because of this, we need to use the
fully qualified path syntax to refer to the appropriate `Color` associated fully qualified path syntax to refer to the appropriate `Color` associated
type, either `<BoxCar as Vehicle>::Color` or `<BoxCar as Box>::Color`, but this type, either `<BoxCar as Vehicle>::Color` or `<BoxCar as Box>::Color`, but this
syntax is not allowed to be used in a function signature. syntax is not allowed to be used in a function signature.
......
...@@ -2117,7 +2117,7 @@ pub fn trait_may_define_assoc_type(self, trait_def_id: DefId, assoc_name: Ident) ...@@ -2117,7 +2117,7 @@ pub fn trait_may_define_assoc_type(self, trait_def_id: DefId, assoc_name: Ident)
}) })
} }
/// Computes the def-ids of the transitive super-traits of `trait_def_id`. This (intentionally) /// Computes the def-ids of the transitive supertraits of `trait_def_id`. This (intentionally)
/// does not compute the full elaborated super-predicates but just the set of def-ids. It is used /// does not compute the full elaborated super-predicates but just the set of def-ids. It is used
/// to identify which traits may define a given associated type to help avoid cycle errors. /// to identify which traits may define a given associated type to help avoid cycle errors.
/// Returns a `DefId` iterator. /// Returns a `DefId` iterator.
......
...@@ -599,7 +599,7 @@ pub fn subst_supertrait( ...@@ -599,7 +599,7 @@ pub fn subst_supertrait(
// where both `'x` and `'b` would have a DB index of 1. // where both `'x` and `'b` would have a DB index of 1.
// The substitution from the input trait-ref is therefore going to be // The substitution from the input trait-ref is therefore going to be
// `'a => 'x` (where `'x` has a DB index of 1). // `'a => 'x` (where `'x` has a DB index of 1).
// - The super-trait-ref is `for<'b> Bar1<'a,'b>`, where `'a` is an // - The supertrait-ref is `for<'b> Bar1<'a,'b>`, where `'a` is an
// early-bound parameter and `'b' is a late-bound parameter with a // early-bound parameter and `'b' is a late-bound parameter with a
// DB index of 1. // DB index of 1.
// - If we replace `'a` with `'x` from the input, it too will have // - If we replace `'a` with `'x` from the input, it too will have
......
...@@ -682,7 +682,7 @@ fn process_trait( ...@@ -682,7 +682,7 @@ fn process_trait(
); );
} }
// super-traits // supertraits
for super_bound in trait_refs.iter() { for super_bound in trait_refs.iter() {
let (def_id, sub_span) = match *super_bound { let (def_id, sub_span) = match *super_bound {
hir::GenericBound::Trait(ref trait_ref, _) => ( hir::GenericBound::Trait(ref trait_ref, _) => (
......
...@@ -199,7 +199,7 @@ pub(crate) fn complain_about_assoc_type_not_found<I>( ...@@ -199,7 +199,7 @@ pub(crate) fn complain_about_assoc_type_not_found<I>(
/// When there are any missing associated types, emit an E0191 error and attempt to supply a /// When there are any missing associated types, emit an E0191 error and attempt to supply a
/// reasonable suggestion on how to write it. For the case of multiple associated types in the /// reasonable suggestion on how to write it. For the case of multiple associated types in the
/// same trait bound have the same name (as they come from different super-traits), we instead /// same trait bound have the same name (as they come from different supertraits), we instead
/// emit a generic note suggesting using a `where` clause to constraint instead. /// emit a generic note suggesting using a `where` clause to constraint instead.
pub(crate) fn complain_about_missing_associated_types( pub(crate) fn complain_about_missing_associated_types(
&self, &self,
...@@ -340,7 +340,7 @@ pub(crate) fn complain_about_missing_associated_types( ...@@ -340,7 +340,7 @@ pub(crate) fn complain_about_missing_associated_types(
using the fully-qualified path to the associated types"; using the fully-qualified path to the associated types";
if !where_constraints.is_empty() && suggestions.is_empty() { if !where_constraints.is_empty() && suggestions.is_empty() {
// If there are duplicates associated type names and a single trait bound do not // If there are duplicates associated type names and a single trait bound do not
// use structured suggestion, it means that there are multiple super-traits with // use structured suggestion, it means that there are multiple supertraits with
// the same associated type name. // the same associated type name.
err.help(where_msg); err.help(where_msg);
} }
......
...@@ -1322,7 +1322,7 @@ fn conv_object_ty_poly_trait_ref( ...@@ -1322,7 +1322,7 @@ fn conv_object_ty_poly_trait_ref(
); );
first_trait.label_with_exp_info(&mut err, "first non-auto trait", "first use"); first_trait.label_with_exp_info(&mut err, "first non-auto trait", "first use");
err.help(&format!( err.help(&format!(
"consider creating a new trait with all of these as super-traits and using that \ "consider creating a new trait with all of these as supertraits and using that \
trait here instead: `trait NewTrait: {} {{}}`", trait here instead: `trait NewTrait: {} {{}}`",
regular_traits regular_traits
.iter() .iter()
......
...@@ -964,7 +964,7 @@ fn assemble_extension_candidates_for_trait( ...@@ -964,7 +964,7 @@ fn assemble_extension_candidates_for_trait(
let trait_ref = ty::TraitRef::new(trait_def_id, trait_substs); let trait_ref = ty::TraitRef::new(trait_def_id, trait_substs);
if self.tcx.is_trait_alias(trait_def_id) { if self.tcx.is_trait_alias(trait_def_id) {
// For trait aliases, assume all super-traits are relevant. // For trait aliases, assume all supertraits are relevant.
let bounds = iter::once(ty::Binder::dummy(trait_ref)); let bounds = iter::once(ty::Binder::dummy(trait_ref));
self.elaborate_bounds(bounds, |this, new_trait_ref, item| { self.elaborate_bounds(bounds, |this, new_trait_ref, item| {
let new_trait_ref = this.erase_late_bound_regions(new_trait_ref); let new_trait_ref = this.erase_late_bound_regions(new_trait_ref);
......
...@@ -32,7 +32,7 @@ LL | type Test = dyn Add + Sub; ...@@ -32,7 +32,7 @@ LL | type Test = dyn Add + Sub;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<[type error]> + Sub<[type error]> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<[type error]> + Sub<[type error]> {}`
= 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> = 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>
error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
......
...@@ -6,7 +6,7 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>; ...@@ -6,7 +6,7 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
= 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> = 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>
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
...@@ -35,7 +35,7 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>; ...@@ -35,7 +35,7 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
= 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> = 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>
error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
...@@ -71,7 +71,7 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>; ...@@ -71,7 +71,7 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
= 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> = 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>
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
...@@ -99,7 +99,7 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>; ...@@ -99,7 +99,7 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
= 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> = 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>
error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
......
...@@ -6,7 +6,7 @@ LL | let _: Box<dyn std::io::Read + std::io::Write>; ...@@ -6,7 +6,7 @@ LL | let _: Box<dyn std::io::Read + std::io::Write>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -23,7 +23,7 @@ LL | let _: Box<dyn Foo>; ...@@ -23,7 +23,7 @@ LL | let _: Box<dyn Foo>;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: std::io::Read + std::io::Write {}`
= 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> = 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>
error: aborting due to 2 previous errors error: aborting due to 2 previous errors
......
...@@ -6,7 +6,7 @@ LL | size_of_copy::<dyn Misc + Copy>(); ...@@ -6,7 +6,7 @@ LL | size_of_copy::<dyn Misc + Copy>();
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -17,7 +17,7 @@ LL | size_of_copy::<dyn Misc + Copy>(); ...@@ -17,7 +17,7 @@ LL | size_of_copy::<dyn Misc + Copy>();
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}`
= 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> = 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>
error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied
......
...@@ -52,7 +52,7 @@ LL | fn foo1(_: &dyn Drop + AsRef<str>) {} ...@@ -52,7 +52,7 @@ LL | fn foo1(_: &dyn Drop + AsRef<str>) {}
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}`
= 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> = 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>
error[E0224]: at least one trait is required for an object type error[E0224]: at least one trait is required for an object type
...@@ -69,7 +69,7 @@ LL | fn foo5(_: &(dyn Drop + dyn AsRef<str>)) {} ...@@ -69,7 +69,7 @@ LL | fn foo5(_: &(dyn Drop + dyn AsRef<str>)) {}
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Drop + AsRef<str> {}`
= 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> = 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>
error: aborting due to 9 previous errors error: aborting due to 9 previous errors
......
...@@ -52,7 +52,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; ...@@ -52,7 +52,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
| | | |
| first non-auto trait | first non-auto trait
| |
= 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> {}` = 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> {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -63,7 +63,7 @@ LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>; ...@@ -63,7 +63,7 @@ LL | let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
| | | |
| first non-auto trait | first non-auto trait
| |
= 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 {}` = 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 {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -74,7 +74,7 @@ LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>; ...@@ -74,7 +74,7 @@ LL | let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
| | | |
| first non-auto trait | first non-auto trait
| |
= 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 {}` = 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 {}`
= 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> = 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>
error: aborting due to 6 previous errors; 3 warnings emitted error: aborting due to 6 previous errors; 3 warnings emitted
......
...@@ -8,7 +8,7 @@ Tests that specialization is working correctly: ...@@ -8,7 +8,7 @@ Tests that specialization is working correctly:
- Specialization via concrete types vs unknown types - Specialization via concrete types vs unknown types
- In top level of the trait reference - In top level of the trait reference
- Embedded within another type (`Vec<T>` vs `Vec<i32>`) - Embedded within another type (`Vec<T>` vs `Vec<i32>`)
- [Specialization based on super trait relationships](specialization-super-traits.rs) - [Specialization based on super trait relationships](specialization-supertraits.rs)
- [On assoc fns](specialization-assoc-fns.rs) - [On assoc fns](specialization-assoc-fns.rs)
- [Ensure that impl order doesn't matter](specialization-out-of-order.rs) - [Ensure that impl order doesn't matter](specialization-out-of-order.rs)
......
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/specialization-super-traits.rs:3:12 --> $DIR/specialization-supertraits.rs:3:12
| |
LL | #![feature(specialization)] LL | #![feature(specialization)]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
......
...@@ -12,7 +12,7 @@ LL | type _T00 = dyn _0 + _0; ...@@ -12,7 +12,7 @@ LL | type _T00 = dyn _0 + _0;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -31,7 +31,7 @@ LL | type _T01 = dyn _1 + _0; ...@@ -31,7 +31,7 @@ LL | type _T01 = dyn _1 + _0;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -53,7 +53,7 @@ LL | type _T02 = dyn _1 + _1; ...@@ -53,7 +53,7 @@ LL | type _T02 = dyn _1 + _1;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -69,7 +69,7 @@ LL | type _T03 = dyn Obj + _1; ...@@ -69,7 +69,7 @@ LL | type _T03 = dyn Obj + _1;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -85,7 +85,7 @@ LL | type _T04 = dyn _1 + Obj; ...@@ -85,7 +85,7 @@ LL | type _T04 = dyn _1 + Obj;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -110,7 +110,7 @@ LL | type _T10 = dyn _2 + _3; ...@@ -110,7 +110,7 @@ LL | type _T10 = dyn _2 + _3;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -129,7 +129,7 @@ LL | type _T11 = dyn _3 + _2; ...@@ -129,7 +129,7 @@ LL | type _T11 = dyn _3 + _2;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -146,7 +146,7 @@ LL | type _T12 = dyn Obj + _2; ...@@ -146,7 +146,7 @@ LL | type _T12 = dyn Obj + _2;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -171,7 +171,7 @@ LL | type _T13 = dyn _2 + Obj; ...@@ -171,7 +171,7 @@ LL | type _T13 = dyn _2 + Obj;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -190,7 +190,7 @@ LL | type _T14 = dyn _1 + _3; ...@@ -190,7 +190,7 @@ LL | type _T14 = dyn _1 + _3;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -209,7 +209,7 @@ LL | type _T15 = dyn _3 + _1; ...@@ -209,7 +209,7 @@ LL | type _T15 = dyn _3 + _1;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -230,7 +230,7 @@ LL | type _T16 = dyn _1 + _4; ...@@ -230,7 +230,7 @@ LL | type _T16 = dyn _1 + _4;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -251,7 +251,7 @@ LL | type _T17 = dyn _4 + _1; ...@@ -251,7 +251,7 @@ LL | type _T17 = dyn _4 + _1;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -268,7 +268,7 @@ LL | type _T20 = dyn _5 + _5; ...@@ -268,7 +268,7 @@ LL | type _T20 = dyn _5 + _5;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -282,7 +282,7 @@ LL | type _T21 = dyn Obj + _5; ...@@ -282,7 +282,7 @@ LL | type _T21 = dyn Obj + _5;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -296,7 +296,7 @@ LL | type _T22 = dyn _5 + Obj; ...@@ -296,7 +296,7 @@ LL | type _T22 = dyn _5 + Obj;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -310,7 +310,7 @@ LL | type _T23 = dyn _5 + Send + Sync + Obj; ...@@ -310,7 +310,7 @@ LL | type _T23 = dyn _5 + Send + Sync + Obj;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -333,7 +333,7 @@ LL | type _T30 = dyn _6; ...@@ -333,7 +333,7 @@ LL | type _T30 = dyn _6;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -356,7 +356,7 @@ LL | type _T31 = dyn _6 + Send; ...@@ -356,7 +356,7 @@ LL | type _T31 = dyn _6 + Send;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -379,7 +379,7 @@ LL | type _T32 = dyn Send + _6; ...@@ -379,7 +379,7 @@ LL | type _T32 = dyn Send + _6;
| trait alias used in trait object type (additional use) | trait alias used in trait object type (additional use)
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -398,7 +398,7 @@ LL | type _T40 = dyn _8 + Obj; ...@@ -398,7 +398,7 @@ LL | type _T40 = dyn _8 + Obj;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -417,7 +417,7 @@ LL | type _T41 = dyn Obj + _8; ...@@ -417,7 +417,7 @@ LL | type _T41 = dyn Obj + _8;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -441,7 +441,7 @@ LL | type _T42 = dyn _8 + _4; ...@@ -441,7 +441,7 @@ LL | type _T42 = dyn _8 + _4;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -465,7 +465,7 @@ LL | type _T43 = dyn _4 + _8; ...@@ -465,7 +465,7 @@ LL | type _T43 = dyn _4 + _8;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -489,7 +489,7 @@ LL | type _T44 = dyn _4 + Send + Sync + _8; ...@@ -489,7 +489,7 @@ LL | type _T44 = dyn _4 + Send + Sync + _8;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -504,7 +504,7 @@ LL | type _T50 = dyn _9 + _10; ...@@ -504,7 +504,7 @@ LL | type _T50 = dyn _9 + _10;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> ObjL<'a> + for<'b> ObjL<'b> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: for<'a> ObjL<'a> + for<'b> ObjL<'b> {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -519,7 +519,7 @@ LL | type _T60 = dyn _11 + _12; ...@@ -519,7 +519,7 @@ LL | type _T60 = dyn _11 + _12;
| | | |
| trait alias used in trait object type (first use) | trait alias used in trait object type (first use)
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)> {}`
= 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> = 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>
error: aborting due to 27 previous errors error: aborting due to 27 previous errors
......
...@@ -6,7 +6,7 @@ LL | let x: Vec<dyn Trait + Sized> = Vec::new(); ...@@ -6,7 +6,7 @@ LL | let x: Vec<dyn Trait + Sized> = Vec::new();
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Trait + Sized {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Trait + Sized {}`
= 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> = 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>
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
......
...@@ -6,7 +6,7 @@ LL | type _0 = dyn Obj + Obj; ...@@ -6,7 +6,7 @@ LL | type _0 = dyn Obj + Obj;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -17,7 +17,7 @@ LL | type _1 = dyn Send + Obj + Obj; ...@@ -17,7 +17,7 @@ LL | type _1 = dyn Send + Obj + Obj;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -28,7 +28,7 @@ LL | type _2 = dyn Obj + Send + Obj; ...@@ -28,7 +28,7 @@ LL | type _2 = dyn Obj + Send + Obj;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -39,7 +39,7 @@ LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>; ...@@ -39,7 +39,7 @@ LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> ObjL<'a> + for<'b> ObjL<'b> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: for<'a> ObjL<'a> + for<'b> ObjL<'b> {}`
= 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> = 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>
error[E0225]: only auto traits can be used as additional traits in a trait object error[E0225]: only auto traits can be used as additional traits in a trait object
...@@ -50,7 +50,7 @@ LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>; ...@@ -50,7 +50,7 @@ LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>;
| | | |
| first non-auto trait | first non-auto trait
| |
= help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)> {}` = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)> {}`
= 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> = 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>
error: aborting due to 5 previous errors error: aborting due to 5 previous errors
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册