]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-102964.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-102964.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-102964.rs:5:41
3    |
4 LL | fn bar_function<T>(function: Foo<T>) -> RcFoo<T> {
5    |    ------------                         ^^^^^^^^ expected struct `Rc`, found `()`
6    |    |
7    |    implicitly returns `()` as its body has no tail or `return` expression
8    |
9    = note: expected struct `Rc<&dyn for<'a> Fn(&'a T)>`
10            found unit type `()`
11 help: consider returning the local binding `rc`
12    |
13 LL ~     let rc = Rc::new(function);
14 LL +     rc
15    |
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.