summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-item/issue-48027.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/associated-item/issue-48027.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/associated-item/issue-48027.stderr')
-rw-r--r--tests/ui/associated-item/issue-48027.stderr27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/associated-item/issue-48027.stderr b/tests/ui/associated-item/issue-48027.stderr
new file mode 100644
index 000000000..45ea41933
--- /dev/null
+++ b/tests/ui/associated-item/issue-48027.stderr
@@ -0,0 +1,27 @@
+error[E0038]: the trait `Bar` cannot be made into an object
+ --> $DIR/issue-48027.rs:6:6
+ |
+LL | impl dyn Bar {}
+ | ^^^^^^^ `Bar` cannot be made into an object
+ |
+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
+ |
+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[E0790]: cannot refer to the associated constant on trait without specifying the corresponding `impl` type
+ --> $DIR/issue-48027.rs:3:32
+ |
+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, E0790.
+For more information about an error, try `rustc --explain E0038`.