summary refs log tree commit diff
path: root/src/test/ui/lifetimes/lifetime-errors/issue_74400.rs
blob: f83384524f71822b4174c5bcf1a784b05a9d9de8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Regression test for #74400: Type mismatch in function arguments E0631, E0271 are falsely
//! recognized as E0308 mismatched types.

use std::convert::identity;

fn main() {}

fn f<T, S>(data: &[T], key: impl Fn(&T) -> S) {
}

fn g<T>(data: &[T]) {
    f(data, identity) //~ ERROR implementation of `FnOnce` is not general
}