Closed
Description
The following error gives no hints for resolving it, even though there is an obvious solution, in this case the only existing associated type of std::ops::Deref.
Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=976e4a98c62d7a0efb2d0d6325774495
fn main() {
let s : <String as std::ops::Deref>::Output = "hey";
}
The current output is:
error[E0576]: cannot find associated type `Output` in trait `std::ops::Deref`
--> src/main.rs:2:42
|
2 | let s : <String as std::ops::Deref>::Output = "hey";
| ^^^^^^ not found in `std::ops::Deref`
For more information about this error, try `rustc --explain E0576`.
Ideally the output should look like:
error[E0576]: cannot find associated type `Output` in trait `std::ops::Deref`
--> src/main.rs:2:42
|
2 | let s : <String as std::ops::Deref>::Output = "hey";
| ^^^^^^ not found in `std::ops::Deref`
note: Did you mean `Target`?
For more information about this error, try `rustc --explain E0576`.