-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Span
s for byte and raw strings and add more detail
#81307
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
cc @wesleywiser |
I knew something was wrong here, the ICE doesn't happen because |
The linked issue is fixed in #81337 by avoiding reparsing values in key-value attributes for the second time (that's where the overridden span is used). The issue with |
1a7560f
to
708ee39
Compare
@petrochenkov addressed your comments and see that you fixed the underlying issue. While I was in this file I updated the diagnostics to bring the up to our current standard of quality. |
adbcd26
to
234e55c
Compare
} else { | ||
diag.help( | ||
"for more information, visit \ | ||
<https://static.rust-lang.org/doc/master/reference.html#literals>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which cases we link to the reference from error messages?
In theory, there's a reference page for every error, but in practice the diagnostics are already too noisy, so perhaps it's not a good idea to add such links just in case, without a strong specific reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The case where this one triggers when using a "fake" escape, like \y
. We could enumerate all the possible ones that are valid, but feared that would be too verbose. Every other case handled in this document provides enough information inline. I'm more worried about the link being stale. The reason I'm adding it is because these escapes are hard to search for.
The PR name and description need an update. |
This comment has been minimized.
This comment has been minimized.
234e55c
to
64d5f03
Compare
Span
s for byte and raw stringsSpan
s for byte and raw strings and add more detail
64d5f03
to
3b5d018
Compare
Thanks! |
📌 Commit 3b5d018 has been approved by |
…etrochenkov Handle `Span`s for byte and raw strings and add more detail CC rust-lang#81208.
Rollup of 15 pull requests Successful merges: - rust-lang#79554 (Generic associated types in trait paths) - rust-lang#80726 (relax adt unsizing requirements) - rust-lang#81307 (Handle `Span`s for byte and raw strings and add more detail ) - rust-lang#81318 (rustdoc-json: Fix has_body) - rust-lang#81456 (Make remote-test-server easier to use with new targets) - rust-lang#81497 (rustdoc: Move `display_fn` struct inside `display_fn`) - rust-lang#81500 (Remove struct_type from union output) - rust-lang#81542 (Expose correct symlink API on WASI) - rust-lang#81676 (Add more information to the error code for 'crate not found') - rust-lang#81682 (Add additional bitset benchmarks) - rust-lang#81730 (Make `Allocator` object-safe) - rust-lang#81763 (Cleanup rustdoc pass descriptions a bit) - rust-lang#81767 (Update LayoutError/LayoutErr stability attributes) - rust-lang#81771 (Indicate change in RSS from start to end of pass in time-passes output) - rust-lang#81781 (Fix `install-awscli.sh` error in CI) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
CC #81208.