allow escaping bound vars when normalizing ty::Opaque
This commit is contained in:
parent
c94ed5ca91
commit
d2398eee0f
3 changed files with 17 additions and 9 deletions
13
src/test/ui/mir/issue-75419-validation-impl-trait.rs
Normal file
13
src/test/ui/mir/issue-75419-validation-impl-trait.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// build-pass
|
||||
|
||||
// This used to fail MIR validation due to the types on both sides of
|
||||
// an assignment not being equal.
|
||||
// The failure doesn't occur with a check-only build.
|
||||
|
||||
fn iter_slice<'a, T>(xs: &'a [T]) -> impl Iterator<Item = &'a T> {
|
||||
xs.iter()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
iter_slice::<()> as fn(_) -> _;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue