Sort a diagnostic by DefPathStr instead of DefId
This commit is contained in:
parent
57f68c3555
commit
6be79cb103
4 changed files with 18 additions and 40 deletions
|
|
@ -127,8 +127,8 @@ LL | Foo.method();
|
|||
= note: the following traits define an item `method`, perhaps you need to implement one of them:
|
||||
candidate #1: `foo::Bar`
|
||||
candidate #2: `PubPub`
|
||||
candidate #3: `no_method_suggested_traits::qux::PrivPub`
|
||||
candidate #4: `Reexported`
|
||||
candidate #3: `Reexported`
|
||||
candidate #4: `no_method_suggested_traits::qux::PrivPub`
|
||||
|
||||
error[E0599]: no method named `method` found for struct `Rc<&mut Box<&Foo>>` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:42:43
|
||||
|
|
@ -140,8 +140,8 @@ LL | std::rc::Rc::new(&mut Box::new(&Foo)).method();
|
|||
= note: the following traits define an item `method`, perhaps you need to implement one of them:
|
||||
candidate #1: `foo::Bar`
|
||||
candidate #2: `PubPub`
|
||||
candidate #3: `no_method_suggested_traits::qux::PrivPub`
|
||||
candidate #4: `Reexported`
|
||||
candidate #3: `Reexported`
|
||||
candidate #4: `no_method_suggested_traits::qux::PrivPub`
|
||||
|
||||
error[E0599]: no method named `method2` found for type `u64` in the current scope
|
||||
--> $DIR/no-method-suggested-traits.rs:45:10
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ note: the trait `Iterator` must be implemented
|
|||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
= note: the following traits define an item `take`, perhaps you need to implement one of them:
|
||||
candidate #1: `std::io::Read`
|
||||
candidate #2: `Iterator`
|
||||
candidate #1: `Iterator`
|
||||
candidate #2: `std::io::Read`
|
||||
|
||||
error[E0061]: this method takes 3 arguments but 0 arguments were supplied
|
||||
--> $DIR/method-call-err-msg.rs:21:7
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ LL | a.cmp(&b)
|
|||
= help: items from traits can only be used if the type parameter is bounded by the trait
|
||||
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
|
||||
|
|
||||
LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
LL | fn f<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| ++++++++++
|
||||
LL | fn f<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
|
||||
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
|
||||
--> $DIR/method-on-unbounded-type-param.rs:5:10
|
||||
|
|
@ -30,10 +30,10 @@ LL | (&a).cmp(&b)
|
|||
= help: items from traits can only be used if the type parameter is bounded by the trait
|
||||
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
|
||||
|
|
||||
LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
LL | fn g<T: Iterator>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| ++++++++++
|
||||
LL | fn g<T: Ord>(a: T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
|
||||
error[E0599]: the method `cmp` exists for reference `&T`, but its trait bounds were not satisfied
|
||||
--> $DIR/method-on-unbounded-type-param.rs:8:7
|
||||
|
|
@ -51,10 +51,10 @@ LL | a.cmp(&b)
|
|||
= help: items from traits can only be used if the type parameter is bounded by the trait
|
||||
help: the following traits define an item `cmp`, perhaps you need to restrict type parameter `T` with one of them:
|
||||
|
|
||||
LL | fn h<T: Ord>(a: &T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
LL | fn h<T: Iterator>(a: &T, b: T) -> std::cmp::Ordering {
|
||||
| ++++++++++
|
||||
LL | fn h<T: Ord>(a: &T, b: T) -> std::cmp::Ordering {
|
||||
| +++++
|
||||
|
||||
error[E0599]: the method `cmp` exists for struct `Box<dyn T>`, but its trait bounds were not satisfied
|
||||
--> $DIR/method-on-unbounded-type-param.rs:14:7
|
||||
|
|
@ -76,8 +76,8 @@ LL | x.cmp(&x);
|
|||
which is required by `&mut dyn T: Iterator`
|
||||
= help: items from traits can only be used if the trait is implemented and in scope
|
||||
= note: the following traits define an item `cmp`, perhaps you need to implement one of them:
|
||||
candidate #1: `Ord`
|
||||
candidate #2: `Iterator`
|
||||
candidate #1: `Iterator`
|
||||
candidate #2: `Ord`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue