You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 :(
On Tue, Sep 25, 2018 at 9:34 AM Marcel Hellwig ***@***.***> wrote:
fn main() {
let a: str;
}
(Playground
<https://play.rust-lang.org/?gist=eb9ebc74259b45a88d8b12ece4bcc023&version=stable&mode=debug&edition=2015>
)
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 :(
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#54555>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABsigCyJtLjIhBOzoGdM3-LM0NNzG7cks5uejDVgaJpZM4W4ouP>
.
For this specific case, just fixing it with sed is probably a good idea. For future proofing though, perhaps linkcheck could be amended to fix that? Though that's probably non-trivial.
@ehuss thanks for the hint. It is not in stable rust, but in beta (and nightly).
I think I haven't updated my git repo (I could swear I did...), so forget about that. In the next stable release, this should be resolved :) thanks for the reference!
Activity
steveklabnik commentedon Sep 25, 2018
Havvy commentedon Sep 26, 2018
For this specific case, just fixing it with
sedis probably a good idea. For future proofing though, perhapslinkcheckcould be amended to fix that? Though that's probably non-trivial.ehuss commentedon Sep 27, 2018
I'm a little confused. This should have been fixed in #53082, unless you are referring to an older version of rustc?
hellow554 commentedon Sep 27, 2018
@ehuss thanks for the hint. It is not in stable rust, but in beta (and nightly).
I think I haven't updated my git repo (I could swear I did...), so forget about that. In the next stable release, this should be resolved :) thanks for the reference!
Havvy commentedon Sep 27, 2018
If it's already fixed, there's no reason keeping the issue open.