]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-102964.stderr
New upstream version 1.76.0+dfsg1
[rustc.git] / tests / 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 `Rc<&dyn Fn(&T)>`, 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 1 previous error
18
19 For more information about this error, try `rustc --explain E0308`.