Skip to content

Commit 58be3c7

Browse files
committed
core: rustc: improve compile message for unsized types
1 parent a5d33d8 commit 58be3c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/marker.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ impl<T> !Send for *mut T { }
4747
/// Types with a constant size known at compile-time.
4848
#[stable(feature = "rust1", since = "1.0.0")]
4949
#[lang = "sized"]
50-
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
50+
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time. \
51+
Try to use `&{Self}` or `Box<{Self}>`?"]
5152
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
5253
pub trait Sized {
5354
// Empty.

0 commit comments

Comments
 (0)