Skip to content

Commit c744158

Browse files
committed
Fix doc link (again)
Similar to #52404. The link for comparison: - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (broken) - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, stable 2nd ed) - https://doc.rust-lang.org/nightly/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2nd ed) - https://doc.rust-lang.org/nightly/book/2018-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2018 ed) This commit is the result of (first) searching via ripgrep (0.8.1 -SIMD -AVX): rg -l dynamically-sized-types-and-sized and then replacing all relevant occurrences via: find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \ s/dynamically-sized-types-and-sized/dynamically-sized-types-and-the-sized-trait/g find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm (Note: Tested on on macOS 10.13 (BSD). `sed -i.bak` should work on Linux (GNU sed) as well, but not tested.)
1 parent dbcb33f commit c744158

30 files changed

+63
-63
lines changed

src/libcore/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<T: ?Sized> !Send for *mut T { }
9595
message="the size for values of type `{Self}` cannot be known at compilation time",
9696
label="doesn't have a size known at compile-time",
9797
note="to learn more, visit <https://doc.rust-lang.org/book/second-edition/\
98-
ch19-04-advanced-types.html#dynamically-sized-types-and-sized>",
98+
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>",
9999
)]
100100
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
101101
pub trait Sized {

src/test/ui/const-unsized.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
55
| ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: constant expressions must have a statically known size
1010

1111
error[E0277]: the size for values of type `str` cannot be known at compilation time
@@ -15,7 +15,7 @@ LL | const CONST_FOO: str = *"foo";
1515
| ^^^^^^ doesn't have a size known at compile-time
1616
|
1717
= help: the trait `std::marker::Sized` is not implemented for `str`
18-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
18+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1919
= note: constant expressions must have a statically known size
2020

2121
error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
@@ -25,7 +25,7 @@ LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
2525
| ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
2626
|
2727
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
28-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
28+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2929
= note: constant expressions must have a statically known size
3030

3131
error[E0277]: the size for values of type `str` cannot be known at compilation time
@@ -35,7 +35,7 @@ LL | static STATIC_BAR: str = *"bar";
3535
| ^^^^^^ doesn't have a size known at compile-time
3636
|
3737
= help: the trait `std::marker::Sized` is not implemented for `str`
38-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
38+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3939
= note: constant expressions must have a statically known size
4040

4141
error: aborting due to 4 previous errors

src/test/ui/error-codes/E0277.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn f(p: Path) { }
55
| ^ doesn't have a size known at compile-time
66
|
77
= help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required because it appears within the type `std::path::Path`
1010
= note: all local variables must have a statically known size
1111

src/test/ui/feature-gate-trivial_bounds.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
9494
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
9595
|
9696
= help: the trait `std::marker::Sized` is not implemented for `str`
97-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
97+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9898
= help: see issue #48214
9999
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
100100

@@ -107,7 +107,7 @@ LL | | }
107107
| |_^ doesn't have a size known at compile-time
108108
|
109109
= help: within `Dst<(dyn A + 'static)>`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)`
110-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
110+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
111111
= note: required because it appears within the type `Dst<(dyn A + 'static)>`
112112
= help: see issue #48214
113113
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
@@ -121,7 +121,7 @@ LL | | }
121121
| |_^ doesn't have a size known at compile-time
122122
|
123123
= help: the trait `std::marker::Sized` is not implemented for `str`
124-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
124+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
125125
= help: see issue #48214
126126
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
127127

src/test/ui/generator/sized-yield.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | | };
99
| |____^ doesn't have a size known at compile-time
1010
|
1111
= help: the trait `std::marker::Sized` is not implemented for `str`
12-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
12+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1313
= note: the yield type of a generator must have a statically known size
1414

1515
error[E0277]: the size for values of type `str` cannot be known at compilation time
@@ -19,7 +19,7 @@ LL | unsafe { gen.resume(); }
1919
| ^^^^^^ doesn't have a size known at compile-time
2020
|
2121
= help: the trait `std::marker::Sized` is not implemented for `str`
22-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
22+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2323

2424
error: aborting due to 2 previous errors
2525

src/test/ui/issue-14366.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let _x = "test" as &::std::any::Any;
55
| ^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `str`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required for the cast to the object type `dyn std::any::Any`
1010

1111
error: aborting due to previous error

src/test/ui/issue-15756.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | &mut something
55
| ^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `[T]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: all local variables must have a statically known size
1010

1111
error: aborting due to previous error

src/test/ui/issue-17651.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | (|| Box::new(*(&[0][..])))();
55
| ^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `[{integer}]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required by `<std::boxed::Box<T>>::new`
1010

1111
error: aborting due to previous error

src/test/ui/issue-18107.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | AbstractRenderer
55
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `(dyn AbstractRenderer + 'static)`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: the return type of a function must have a statically known size
1010

1111
error: aborting due to previous error

src/test/ui/issue-18919.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | | }
77
| |_^ doesn't have a size known at compile-time
88
|
99
= help: the trait `std::marker::Sized` is not implemented for `dyn for<'r> std::ops::Fn(&'r isize) -> isize`
10-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
10+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1111
= note: required by `std::option::Option`
1212

1313
error: aborting due to previous error

0 commit comments

Comments
 (0)