]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/associated-item/issue-48027.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / associated-item / issue-48027.stderr
index 33ab4bb967a9704135fa83e75bb38cff50417d56..45ea419336b2c72c1dca32e9a1ac0a8ff558f0ef 100644 (file)
@@ -4,7 +4,6 @@ error[E0038]: the trait `Bar` cannot be made into an object
 LL | impl dyn Bar {}
    |      ^^^^^^^ `Bar` cannot be made into an object
    |
-   = help: consider moving `X` to another trait
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
   --> $DIR/issue-48027.rs:2:11
    |
@@ -12,25 +11,17 @@ LL | trait Bar {
    |       --- this trait cannot be made into an object...
 LL |     const X: usize;
    |           ^ ...because it contains this associated `const`
+   = help: consider moving `X` to another trait
 
-error[E0283]: type annotations needed
+error[E0790]: cannot refer to the associated constant on trait without specifying the corresponding `impl` type
   --> $DIR/issue-48027.rs:3:32
    |
-LL |     fn return_n(&self) -> [u8; Bar::X];
-   |                                ^^^^^^
-   |                                |
-   |                                cannot infer type
-   |                                help: use the fully qualified path to an implementation: `<Type as Bar>::X`
-   |
-   = note: cannot satisfy `_: Bar`
-   = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
-note: required by `Bar::X`
-  --> $DIR/issue-48027.rs:2:5
-   |
 LL |     const X: usize;
-   |     ^^^^^^^^^^^^^^^
+   |     --------------- `Bar::X` defined here
+LL |     fn return_n(&self) -> [u8; Bar::X];
+   |                                ^^^^^^ cannot refer to the associated constant of trait
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0038, E0283.
+Some errors have detailed explanations: E0038, E0790.
 For more information about an error, try `rustc --explain E0038`.