]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/traits/trait-item-privacy.stderr
keep predicate order and tweak output
[rust.git] / src / test / ui / traits / trait-item-privacy.stderr
index 072328ab50c7068283ac0809d6e7c4c1f55bef78..2c0591c95f69086b4ccdae985aeeefb2af479df4 100644 (file)
@@ -8,8 +8,11 @@ LL |     S.a();
    |       ^ method not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `a`, perhaps you need to implement it:
-           candidate #1: `method::A`
+note: `method::A` defines an item `a`, perhaps you need to implement it
+  --> $DIR/trait-item-privacy.rs:6:5
+   |
+LL |     trait A {
+   |     ^^^^^^^
 
 error[E0599]: no method named `b` found for struct `S` in the current scope
   --> $DIR/trait-item-privacy.rs:68:7
@@ -49,8 +52,11 @@ LL |     S::a(&S);
    |        ^ function or associated item not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `a`, perhaps you need to implement it:
-           candidate #1: `method::A`
+note: `method::A` defines an item `a`, perhaps you need to implement it
+  --> $DIR/trait-item-privacy.rs:6:5
+   |
+LL |     trait A {
+   |     ^^^^^^^
 
 error[E0599]: no function or associated item named `b` found for struct `S` in the current scope
   --> $DIR/trait-item-privacy.rs:80:8
@@ -83,8 +89,11 @@ LL |     S::A;
    |        ^ associated item not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `A`, perhaps you need to implement it:
-           candidate #1: `assoc_const::A`
+note: `assoc_const::A` defines an item `A`, perhaps you need to implement it
+  --> $DIR/trait-item-privacy.rs:24:5
+   |
+LL |     trait A {
+   |     ^^^^^^^
 
 error[E0599]: no associated item named `B` found for struct `S` in the current scope
   --> $DIR/trait-item-privacy.rs:98:8