rust/tests/ui/typeck/issue-13853-5.stderr

26 lines
937 B
Plaintext

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/issue-13853-5.rs:7:10
|
LL | impl<'a, T: Deserializable> Deserializable for &'a str {
| ^ unconstrained type parameter
error[E0308]: mismatched types
--> $DIR/issue-13853-5.rs:9:70
|
LL | fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
| ----------------- ^^^^^^^ expected `&str`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
help: consider returning the local binding `_y`
|
LL ~ fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
LL + _y
LL ~
|
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0207, E0308.
For more information about an error, try `rustc --explain E0207`.