Fix rebase and sort assoc type list for deterministic output
This commit is contained in:
parent
93fb219579
commit
621d7e959b
@ -1686,6 +1686,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
names.sort();
|
||||
trait_bound_spans.sort();
|
||||
let mut err = struct_span_err!(
|
||||
tcx.sess,
|
||||
trait_bound_spans,
|
||||
|
@ -6,7 +6,7 @@ trait Hierarchy {
|
||||
type Value;
|
||||
type ChildKey;
|
||||
type Children = dyn Index<Self::ChildKey, Output=dyn Hierarchy>;
|
||||
//~^ ERROR: the value of the associated types `Value` (from trait `Hierarchy`), `ChildKey`
|
||||
//~^ ERROR: the value of the associated types
|
||||
|
||||
fn data(&self) -> Option<(Self::Value, Self::Children)>;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ fn dent<C:BoxCar>(c: C, color: C::Color) {
|
||||
|
||||
fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
|
||||
//~^ ERROR ambiguous associated type
|
||||
//~| ERROR the value of the associated types `Color` (from trait `Vehicle`), `Color` (from
|
||||
//~| ERROR the value of the associated types
|
||||
}
|
||||
|
||||
fn paint<C:BoxCar>(c: C, d: C::Color) {
|
||||
@ -30,8 +30,8 @@ fn paint<C:BoxCar>(c: C, d: C::Color) {
|
||||
}
|
||||
|
||||
fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
|
||||
//~^ ERROR the value of the associated types `Color` (from trait `Vehicle`), `Color` (from
|
||||
//~| ERROR equality constraints are not yet supported in where clauses
|
||||
//~^ ERROR the value of the associated types
|
||||
//~| ERROR equality constraints are not yet supported in `where` clauses
|
||||
}
|
||||
|
||||
fn dent_object_3<X, COLOR>(c: X)
|
||||
|
@ -1,10 +1,10 @@
|
||||
error: equality constraints are not yet supported in where clauses
|
||||
error: equality constraints are not yet supported in `where` clauses
|
||||
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:46
|
||||
|
|
||||
LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not supported
|
||||
|
|
||||
= note: for more information, see #20041
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/20041
|
||||
|
||||
error[E0221]: ambiguous associated type `Color` in bounds of `C`
|
||||
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32
|
||||
@ -45,7 +45,7 @@ LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
|
||||
T: Box::Color = COLOR,
|
||||
T: Vehicle::Color = COLOR
|
||||
|
||||
error[E0191]: the value of the associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
|
||||
error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified
|
||||
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30
|
||||
|
|
||||
LL | type Color;
|
||||
@ -80,7 +80,7 @@ help: use fully qualified syntax to disambiguate
|
||||
LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0191]: the value of the associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified
|
||||
error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified
|
||||
--> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
|
||||
|
|
||||
LL | type Color;
|
||||
|
@ -9,8 +9,8 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:12:52
|
||||
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:12:21
|
||||
|
|
||||
LL | type A;
|
||||
| ------- `A` defined here
|
||||
@ -38,8 +38,8 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Sub`), `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Add`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:15:43
|
||||
error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:15:21
|
||||
|
|
||||
LL | type A;
|
||||
| ------- `A` defined here
|
||||
@ -74,8 +74,8 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Sub`), `A` (from trait `Y`), `Output` (from trait `std::ops::Add`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:18:32
|
||||
error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:18:21
|
||||
|
|
||||
LL | type A;
|
||||
| ------- `A` defined here
|
||||
@ -102,8 +102,8 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Sub`), `Output` (from trait `std::ops::Add`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:21:32
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:21:21
|
||||
|
|
||||
LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
|
||||
| ^^^^^^^^ ^^^^^^^^ associated type `Output` must be specified
|
||||
@ -115,7 +115,7 @@ help: specify the associated types
|
||||
LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Div`) must be specified
|
||||
error[E0191]: the value of the associated types `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Mul`) must be specified
|
||||
--> $DIR/missing-associated-types.rs:24:21
|
||||
|
|
||||
LL | type Bal<Rhs> = dyn X<Rhs>;
|
||||
|
@ -35,8 +35,8 @@ LL | type Test = dyn Add + Sub;
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0191]: the value of the associated types `Output` (from trait `Sub`), `Output` (from trait `Add`) must be specified
|
||||
--> $DIR/issue-22560.rs:9:23
|
||||
error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
|
||||
--> $DIR/issue-22560.rs:9:17
|
||||
|
|
||||
LL | type Output;
|
||||
| ------------ `Output` defined here
|
||||
|
Loading…
Reference in New Issue
Block a user