]>
Commit | Line | Data |
---|---|---|
5099ac24 FG |
1 | error[E0308]: mismatched types |
2 | --> $DIR/return-impl-trait.rs:15:5 | |
3 | | | |
4 | LL | fn bar<T: Trait + std::marker::Sync>() -> T | |
5 | | - - | |
6 | | | | | |
7 | | | expected `T` because of return type | |
8 | | this type parameter help: consider using an impl return type: `impl Trait + std::marker::Sync + Send` | |
9 | ... | |
10 | LL | () | |
11 | | ^^ expected type parameter `T`, found `()` | |
12 | | | |
13 | = note: expected type parameter `T` | |
14 | found unit type `()` | |
15 | ||
16 | error[E0308]: mismatched types | |
17 | --> $DIR/return-impl-trait.rs:23:5 | |
18 | | | |
19 | LL | fn other_bounds<T>() -> T | |
20 | | - - | |
21 | | | | | |
22 | | | expected `T` because of return type | |
23 | | | help: consider using an impl return type: `impl Trait` | |
24 | | this type parameter | |
25 | ... | |
26 | LL | () | |
27 | | ^^ expected type parameter `T`, found `()` | |
28 | | | |
29 | = note: expected type parameter `T` | |
30 | found unit type `()` | |
31 | ||
32 | error: aborting due to 2 previous errors | |
33 | ||
34 | For more information about this error, try `rustc --explain E0308`. |