Code
impl<TkCanvas<Inst>> Deref for ChartDisplay<Inst> { // Note the incorrect `<TkCanvas<Inst>>`
type Target = TkCanvas<Inst>;
fn deref(&self) -> &Self::Target {
&self.hull
}
}
Current output
error: expected `::`, found `Deref`
--> src/lib.rs:6:22
|
6 | impl<TkCanvas<Inst>> Deref for ChartDisplay<Inst> {
| ^^^^^ expected `::`
Desired output
error: expected type parameter, found path `TkCanvas<Inst>`
--> src/lib.rs:6:22
|
6 | impl<TkCanvas<Inst>> Deref for ChartDisplay<Inst> {
| ^^^^^^^^^^^^^^ expected type parameter, found path
|
help: you might have meant to bind a type parameter to a trait
|
6 | impl<T: TkCanvas<Inst>> Deref for ChartDisplay<Inst> {
| ++
help: alternatively, you might have meant to introduce type parameter
|
6 | impl<Inst> Deref for ChartDisplay<Inst> {
| ++++
Rationale and extra context
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=0f2e1d057720a06ecd77956f5b411416
Found in the wild at https://users.rust-lang.org/t/help-me-understand-this-compiler-error/134753
Other cases
Rust Version
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=0f2e1d057720a06ecd77956f5b411416
Found in the wild at https://users.rust-lang.org/t/help-me-understand-this-compiler-error/134753
Other cases
Rust Version
Anything else?
No response