rust/tests/ui/issues/issue-102964.rs

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

11 lines
219 B
Rust
Raw Normal View History

2022-10-12 09:32:20 -05:00
use std::rc::Rc;
type Foo<'a, T> = &'a dyn Fn(&T);
type RcFoo<'a, T> = Rc<Foo<'a, T>>;
fn bar_function<T>(function: Foo<T>) -> RcFoo<T> {
//~^ ERROR mismatched types
let rc = Rc::new(function);
}
fn main() {}