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
{{ message }}
Repository navigation
Commit 172aab0
Browse filesBrowse the repository at this point in the historyBrowse files
Rollup merge of #165943 - estebank:issue-37629, r=mati865
Tweak "missing method on type available here" diagnostic
Point at trait that is implemented but private. (Fix#37629.)
```
help: trait `crate::method::A` which provides `a` is implemented but not reachable
--> $DIR/item-privacy.rs:7:5
|
LL | trait A {
| ^^^^^^^
```
Point at method even when available through autoderef.
Use note instead of label when pointing at available method.
Point at `impl` where method is available in stead of just pointing at the trait:
```
error[E0599]: no method named `qwer` found for struct `S` in the current scope
--> $DIR/use-placement-typeck.rs:13:7
|
LL | s.qwer();
| ^^^^ method not found in `S`
...
LL | pub struct S;
| ------------ method `qwer` not found for this struct
|
note: the method is available on trait `Bar` for `S`
--> $DIR/use-placement-typeck.rs:26:9
|
LL | impl Bar for S {
LL | fn qwer(&self) {}
| ^^^^^^^^^^^^^^ the method is available here
= help: items from traits can only be used if the trait is in scope
help: trait `Bar` which provides `qwer` is implemented but not in scope; perhaps you want to import it
|
LL + use crate::m::Bar;
|
```
0 commit comments