summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/issue-75419-validation-impl-trait.rs
blob: a8741befb0cfe176d844804f0f539b579cc108c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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(_) -> _;
}