-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve
ProjectionPredicate
during normalization (#830)
* add test * fix #829 hopefully * Update crates/flux-middle/src/rty/projections.rs Co-authored-by: Nico Lehmann <nico.lehmannm@gmail.com> * change todo to tracked-span-bug
- Loading branch information
1 parent
9695996
commit b7f0858
Showing
5 changed files
with
164 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
trait Trait1 { | ||
type Assoc1; | ||
} | ||
|
||
impl Trait1 for i32 { | ||
type Assoc1 = bool; | ||
} | ||
|
||
trait Trait2 { | ||
type Assoc2; | ||
} | ||
|
||
struct S<T> { | ||
fld: T, | ||
} | ||
|
||
impl<T1, T2> Trait2 for S<T2> | ||
where | ||
T2: Trait1<Assoc1 = T1>, | ||
{ | ||
type Assoc2 = T1; | ||
} | ||
|
||
fn test(x: <S<i32> as Trait2>::Assoc2) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
trait Trait1 { | ||
type Assoc1; | ||
} | ||
|
||
impl Trait1 for i32 { | ||
type Assoc1 = i32; | ||
} | ||
|
||
trait Trait2 { | ||
type Assoc2; | ||
} | ||
|
||
struct S<T> { | ||
fld: T, | ||
} | ||
|
||
impl<T1, T2, T3> Trait2 for S<T1> | ||
where | ||
T2: Trait1<Assoc1 = T3>, | ||
T1: Trait1<Assoc1 = T2>, | ||
{ | ||
type Assoc2 = T1; | ||
} | ||
|
||
fn test(x: <S<i32> as Trait2>::Assoc2) {} |