Closed
Description
fn main() {
let a: str;
}
Errors:
Compiling playground v0.0.1 (file:///playground)
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> src/main.rs:2:9
|
2 | let a: str;
| ^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `str`
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
= note: all local variables must have a statically known size
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
The note contains a wrong link
[...]/ch19-04-advanced-types.html#dynamically-sized-types-and-sized
vs
[...]/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
As easy as this fix could be, I grepped for the error and found ~120 occurences, most of them in the tests of course.
While I want to solve this, I ask myself, if the best strategy is a simple sed
or is there a better and not so error-prone approach? If one link changes in the future, all of this has to be done again. I don't think that that is a good solution :(