]> 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 4df8845de279ae2042639aeede55455783ab14fa..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
@@ -111,16 +120,22 @@ error[E0038]: the trait `assoc_const::C` cannot be made into an object
   --> $DIR/trait-item-privacy.rs:101:5
    |
 LL |         const A: u8 = 0;
-   |               - the trait cannot contain associated consts like `A`
+   |               - ...because it contains this associated `const`
 ...
 LL |         const B: u8 = 0;
-   |               - the trait cannot contain associated consts like `B`
+   |               - ...because it contains this associated `const`
 ...
+LL |     pub trait C: A + B {
+   |               - this trait cannot be made into an object...
 LL |         const C: u8 = 0;
-   |               - the trait cannot contain associated consts like `C`
+   |               - ...because it contains this associated `const`
 ...
 LL |     C::A;
    |     ^^^^ the trait `assoc_const::C` cannot be made into an object
+   |
+   = help: consider moving `C` to another trait
+   = help: consider moving `B` to another trait
+   = help: consider moving `A` to another trait
 
 error[E0223]: ambiguous associated type
   --> $DIR/trait-item-privacy.rs:115:12