You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0401]: can't use type parameters from outer function
--> src/main.rs:9:25
|
7 | impl A {
| ---- `Self` type implicitely declared here, on the `impl`
8 | fn banana(&mut self) {
9 | fn peach(this: &Self) {
| ----- ^^^^ use of type variable from outer function
| |
| help: try using a local type parameter instead: `peach<Self>`
It seems that the help message is trying to suggest to introduce a local type parameter, but is worded rather poorly, as if suggesting to use a peach<Self> (e.g. this: &peach<Self>?).
Perhaps rewording the help message to explicitly say "introduce" rather than "use" would be better, but even then Self is a keyword, and cannot be introduced as a local generic parameter anyway.
The text was updated successfully, but these errors were encountered:
Code
Error
It seems that the help message is trying to suggest to introduce a local type parameter, but is worded rather poorly, as if suggesting to use a
peach<Self>
(e.g.this: &peach<Self>
?).Perhaps rewording the help message to explicitly say "introduce" rather than "use" would be better, but even then
Self
is a keyword, and cannot be introduced as a local generic parameter anyway.The text was updated successfully, but these errors were encountered: