1 error[E0308]: mismatched types
2 --> $DIR/issue-102964.rs:5:41
4 LL | fn bar_function<T>(function: Foo<T>) -> RcFoo<T> {
5 | ------------ ^^^^^^^^ expected `Rc<&dyn Fn(&T)>`, found `()`
7 | implicitly returns `()` as its body has no tail or `return` expression
9 = note: expected struct `Rc<&dyn for<'a> Fn(&'a T)>`
11 help: consider returning the local binding `rc`
13 LL ~ let rc = Rc::new(function);
17 error: aborting due to 1 previous error
19 For more information about this error, try `rustc --explain E0308`.