mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
11 lines
219 B
Rust
11 lines
219 B
Rust
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() {}
|