forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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 matching on type of projection
- Loading branch information
1 parent
f2abf82
commit 48b2bbd
Showing
2 changed files
with
27 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
20 changes: 20 additions & 0 deletions
20
tests/ui/traits/next-solver/typeck/resolve-before-checking-builtin-ptr.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,20 @@ | ||
//@ check-pass | ||
//@ compile-flags: -Znext-solver | ||
|
||
trait Mirror { | ||
type Assoc; | ||
} | ||
impl<T> Mirror for T { | ||
type Assoc = T; | ||
} | ||
|
||
struct Place { | ||
field: <&'static [u8] as Mirror>::Assoc, | ||
} | ||
|
||
fn main() { | ||
let local = Place { field: &[] }; | ||
let z = || { | ||
let y = &local.field[0]; | ||
}; | ||
} |