-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structurally resolve before applying projection in borrowck
- Loading branch information
1 parent
f2abf82
commit 26c7774
Showing
3 changed files
with
72 additions
and
2 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
32 changes: 32 additions & 0 deletions
32
tests/ui/traits/next-solver/structurally-normalize-in-borrowck-field-projection.rs
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,32 @@ | ||
//@ check-pass | ||
//@ compile-flags: -Znext-solver | ||
|
||
trait Interner: Sized { | ||
type Value; | ||
} | ||
|
||
enum Kind<I: Interner> { | ||
Value(I::Value), | ||
} | ||
|
||
struct Intern; | ||
|
||
impl Interner for Intern { | ||
type Value = Wrap<u32>; | ||
} | ||
|
||
struct Wrap<T>(T); | ||
|
||
type KindAlias = Kind<Intern>; | ||
|
||
trait PrettyPrinter: Sized { | ||
fn hello(c: KindAlias) { | ||
match c { | ||
KindAlias::Value(Wrap(v)) => { | ||
println!("{v:?}"); | ||
} | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |