diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs')
-rw-r--r-- | src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs b/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs deleted file mode 100644 index df19332b6..000000000 --- a/src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Test equality constraints in a where clause where the type being -// equated appears in a supertrait. - -pub trait Vehicle { - type Color; - - fn go(&self) { } -} - -pub trait Box { - type Color; - // - fn mail(&self) { } -} - -pub trait BoxCar : Box + Vehicle { -} - -fn dent<C:BoxCar>(c: C, color: C::Color) { - //~^ ERROR ambiguous associated type `Color` in bounds of `C` -} - -fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) { - //~^ ERROR ambiguous associated type - //~| ERROR the value of the associated types -} - -fn paint<C:BoxCar>(c: C, d: C::Color) { - //~^ ERROR ambiguous associated type `Color` in bounds of `C` -} - -fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR { - //~^ 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) -where X: BoxCar, - X: Vehicle<Color = COLOR>, - X: Box<Color = COLOR> -{} // OK! - -pub fn main() { } |