Skip to content

Commit b7db6bb

Browse files
committed
Remove Sized on_unimplemented note
1 parent 28e6f1f commit b7db6bb

File tree

82 files changed

+3
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3
-169
lines changed

src/libcore/marker.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,8 @@ impl<T: ?Sized> !Send for *mut T {}
8484
#[stable(feature = "rust1", since = "1.0.0")]
8585
#[lang = "sized"]
8686
#[rustc_on_unimplemented(
87-
on(parent_trait = "std::path::Path", label = "borrow the `Path` instead"),
8887
message = "the size for values of type `{Self}` cannot be known at compilation time",
89-
label = "doesn't have a size known at compile-time",
90-
note = "to learn more, visit <https://doc.rust-lang.org/book/\
91-
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>"
88+
label = "doesn't have a size known at compile-time"
9289
)]
9390
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
9491
#[rustc_specialization_trait]

src/test/ui/asm/type-check-1.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ LL | asm!("{}", in(reg) v[..]);
1717
| ^^^^^ doesn't have a size known at compile-time
1818
|
1919
= help: the trait `std::marker::Sized` is not implemented for `[u64]`
20-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2120
= note: all inline asm arguments must have a statically known size
2221

2322
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
@@ -27,7 +26,6 @@ LL | asm!("{}", out(reg) v[..]);
2726
| ^^^^^ doesn't have a size known at compile-time
2827
|
2928
= help: the trait `std::marker::Sized` is not implemented for `[u64]`
30-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3129
= note: all inline asm arguments must have a statically known size
3230

3331
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
@@ -37,7 +35,6 @@ LL | asm!("{}", inout(reg) v[..]);
3735
| ^^^^^ doesn't have a size known at compile-time
3836
|
3937
= help: the trait `std::marker::Sized` is not implemented for `[u64]`
40-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
4138
= note: all inline asm arguments must have a statically known size
4239

4340
error: aborting due to 5 previous errors

src/test/ui/associated-types/associated-types-unsized.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ LL | let x = t.get();
55
| ^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `<T as Get>::Value`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
98
= note: all local variables must have a statically known size
109
= help: unsized locals are gated as an unstable feature
1110
help: consider further restricting the associated type

src/test/ui/associated-types/defaults-suitability.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ LL | pub struct Vec<T> {
139139
| - required by this bound in `std::vec::Vec`
140140
|
141141
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
142-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
143142

144143
error: aborting due to 11 previous errors
145144

src/test/ui/associated-types/issue-63593.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL | type This = Self;
77
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
88
|
99
= help: the trait `std::marker::Sized` is not implemented for `Self`
10-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1110
help: consider further restricting `Self`
1211
|
1312
LL | trait MyTrait: std::marker::Sized {

src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ LL | pub trait Add<Rhs = Self> {
1010
| --- required by this bound in `std::ops::Add`
1111
|
1212
= help: the trait `std::marker::Sized` is not implemented for `Self`
13-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1413
help: consider further restricting `Self`
1514
|
1615
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + std::marker::Sized {}

src/test/ui/async-await/issue-72590-type-error-sized.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ LL | async fn frob(self) {}
1717
| ^^^^ doesn't have a size known at compile-time
1818
|
1919
= help: within `Foo`, the trait `std::marker::Sized` is not implemented for `str`
20-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2120
= note: required because it appears within the type `Foo`
2221
= note: all local variables must have a statically known size
2322
= help: unsized locals are gated as an unstable feature

src/test/ui/bad/bad-sized.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ LL | pub struct Vec<T> {
2121
| - required by this bound in `std::vec::Vec`
2222
|
2323
= help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
24-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2524

2625
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
2726
--> $DIR/bad-sized.rs:4:37
@@ -30,7 +29,6 @@ LL | let x: Vec<dyn Trait + Sized> = Vec::new();
3029
| ^^^^^^^^ doesn't have a size known at compile-time
3130
|
3231
= help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
33-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3432
= note: required by `std::vec::Vec::<T>::new`
3533

3634
error: aborting due to 3 previous errors

src/test/ui/box-into-boxed-slice-fail.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ LL | let _ = Box::into_boxed_slice(boxed_slice);
55
| ^^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
98
= note: required by `std::boxed::Box::<T>::into_boxed_slice`
109

1110
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
@@ -15,7 +14,6 @@ LL | let _ = Box::into_boxed_slice(boxed_slice);
1514
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
1615
|
1716
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
18-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1917
= note: slice and array elements must have `Sized` type
2018

2119
error[E0277]: the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time
@@ -25,7 +23,6 @@ LL | let _ = Box::into_boxed_slice(boxed_trait);
2523
| ^^^^^^^^^^^ doesn't have a size known at compile-time
2624
|
2725
= help: the trait `std::marker::Sized` is not implemented for `dyn std::fmt::Debug`
28-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2926
= note: required by `std::boxed::Box::<T>::into_boxed_slice`
3027

3128
error[E0277]: the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time
@@ -35,7 +32,6 @@ LL | let _ = Box::into_boxed_slice(boxed_trait);
3532
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
3633
|
3734
= help: the trait `std::marker::Sized` is not implemented for `dyn std::fmt::Debug`
38-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3935
= note: slice and array elements must have `Sized` type
4036

4137
error: aborting due to 4 previous errors

src/test/ui/chalkify/impl_wf.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LL | impl Foo for str { }
88
| ^^^ doesn't have a size known at compile-time
99
|
1010
= help: the trait `std::marker::Sized` is not implemented for `str`
11-
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1211

1312
error[E0277]: the trait bound `f32: Foo` is not satisfied
1413
--> $DIR/impl_wf.rs:27:17

0 commit comments

Comments
 (0)