Work around type normalization issues
This commit is contained in:
parent
3bf94b2c9d
commit
7addc115eb
2 changed files with 26 additions and 1 deletions
|
|
@ -0,0 +1,23 @@
|
|||
// check-pass
|
||||
|
||||
// From https://github.com/rust-lang/rust/issues/72476
|
||||
|
||||
trait A {
|
||||
type Projection;
|
||||
}
|
||||
|
||||
impl A for () {
|
||||
type Projection = bool;
|
||||
// using () instead of bool here does compile though
|
||||
}
|
||||
|
||||
struct Next<T: A>(T::Projection);
|
||||
|
||||
fn f(item: Next<()>) {
|
||||
match item {
|
||||
Next(true) => {}
|
||||
Next(false) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue