fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
614 B19 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-102964.rs:5:41
3   |
4LL | 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 `()`
11help: consider returning the local binding `rc`
12   |
13LL ~     let rc = Rc::new(function);
14LL +     rc
15   |
16
17error: aborting due to previous error
18
19For more information about this error, try `rustc --explain E0308`.