diff options
Diffstat (limited to 'tests/ui/traits/const-traits/span-bug-issue-121418.stderr')
| -rw-r--r-- | tests/ui/traits/const-traits/span-bug-issue-121418.stderr | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/ui/traits/const-traits/span-bug-issue-121418.stderr b/tests/ui/traits/const-traits/span-bug-issue-121418.stderr index 92cfecd0540..f41c19b4573 100644 --- a/tests/ui/traits/const-traits/span-bug-issue-121418.stderr +++ b/tests/ui/traits/const-traits/span-bug-issue-121418.stderr @@ -8,17 +8,6 @@ LL | impl const dyn T { | = note: only trait implementations may be annotated with `const` -error[E0277]: the size for values of type `(dyn T + 'static)` cannot be known at compilation time - --> $DIR/span-bug-issue-121418.rs:8:27 - | -LL | pub const fn new() -> std::sync::Mutex<dyn T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time - | - = help: within `Mutex<(dyn T + 'static)>`, the trait `Sized` is not implemented for `(dyn T + 'static)` -note: required because it appears within the type `Mutex<(dyn T + 'static)>` - --> $SRC_DIR/std/src/sync/poison/mutex.rs:LL:COL - = note: the return type of a function must have a statically known size - error[E0308]: mismatched types --> $DIR/span-bug-issue-121418.rs:8:27 | @@ -30,6 +19,17 @@ LL | pub const fn new() -> std::sync::Mutex<dyn T> {} = note: expected struct `Mutex<(dyn T + 'static)>` found unit type `()` +error[E0277]: the size for values of type `(dyn T + 'static)` cannot be known at compilation time + --> $DIR/span-bug-issue-121418.rs:8:27 + | +LL | pub const fn new() -> std::sync::Mutex<dyn T> {} + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `Mutex<(dyn T + 'static)>`, the trait `Sized` is not implemented for `(dyn T + 'static)` +note: required because it appears within the type `Mutex<(dyn T + 'static)>` + --> $SRC_DIR/std/src/sync/poison/mutex.rs:LL:COL + = note: the return type of a function must have a statically known size + error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0308. |
