]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/issue-75419-validation-impl-trait.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / ui / mir / issue-75419-validation-impl-trait.rs
1 // build-pass
2
3 // This used to fail MIR validation due to the types on both sides of
4 // an assignment not being equal.
5 // The failure doesn't occur with a check-only build.
6
7 fn iter_slice<'a, T>(xs: &'a [T]) -> impl Iterator<Item = &'a T> {
8     xs.iter()
9 }
10
11 fn main() {
12     iter_slice::<()> as fn(_) -> _;
13 }