rust/tests/ui/higher-ranked/higher-ranked-lifetime-error.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
180 B
Rust
Raw Normal View History

fn assert_all<F, T>(_f: F)
where
F: FnMut(&String) -> T,
{
}
fn id(x: &String) -> &String {
x
}
fn main() {
assert_all::<_, &String>(id);
//~^ mismatched types
}