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
fnfoo(){for x {
docomments(appear, above(or, below));well(lets, find, out);heres(an, irrelevant, call, to, the, function);how(about, now);to(drive, home, point);code(establishing, precondition, of, how,II);// this comment is pointing out some precondition specifically// about `how(..)` at this point in control-flow; yikeshow(about, now);// this comment is about `how`'s post-condition; (another yikes)code(requiring, postcondition, of, how,II);}}
check out this magic trick that rustc --pretty pulls:
% x86_64-apple-darwin/stage2/bin/rustc --version
x86_64-apple-darwin/stage2/bin/rustc 0.7-pre (935882b 2013-06-29 05:43:33 +0200)
host: x86_64-apple-darwin
% x86_64-apple-darwin/stage2/bin/rustc --pretty normal /tmp/foo.rs
fn foo() {
// this comment is pointing out some precondition specifically
// about `how(..)` at this point in control-flow; yikes
// this comment is about `how`'s post-condition; (another yikes)
for x || {
docomments(appear, above(or, below));
well(lets, find, out);
heres(an, irrelevant, call, to, the, function);
how(about, now);
to(drive, home, point);
code(establishing, precondition, of, how, II);
how(about, now);
code(requiring, postcondition, of, how, II);
}
}
The text was updated successfully, but these errors were encountered:
Indeed, the best I can determine is that it was fixed by 30fca57, though I am not sufficiently familiar with the interaction of spans and the pretty printer to say that with 100% confidence. I don't see an issue number for the change to spans.
The for-comment.rs test was added in reaction to that change, in 376d5d6 which in turn was part of a rollup PR: #7598
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jul 29, 2021
check out this magic trick that
rustc --pretty
pulls:The text was updated successfully, but these errors were encountered: