-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix crate-name option in rustdoc #51256
Conversation
src/librustc/middle/cstore.rs
Outdated
@@ -276,7 +276,7 @@ pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option<Span>) { | |||
} | |||
for c in s.chars() { | |||
if c.is_alphanumeric() { continue } | |||
if c == '_' { continue } | |||
if c == '_' { continue } |
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.
Why is this unrelated whitespace fix in here?
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.
Oups. Just went through the code trying to understand what was going on...
Slightly alarming that the function at fault is the same one that rustc uses. I wonder if that function should be fixed as well? To be sure, this PR still needs to land. It's weird that we're not handing the user-provided crate name to the compiler. |
That's the case of most rustdoc options. The rustc function isn't at fault, the option handling on rustdoc's side is. |
89264fa
to
3cbcc5a
Compare
Thanks! r=me pending travis. |
@bors: r=QuietMisdreavus |
📌 Commit 3cbcc5a has been approved by |
…me, r=QuietMisdreavus Fix crate-name option in rustdoc Fixes rust-lang#51229. r? @QuietMisdreavus
Rollup of 7 pull requests Successful merges: - #50852 (Add doc comment to hiding portions of code example) - #51183 (Update rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function) - #51255 (Fix confusing error message for sub_instant) - #51256 (Fix crate-name option in rustdoc) - #51308 (Check array indices in constant propagation) - #51343 (test: Ignore some problematic tests on sparc and sparc64) - #51358 (Tests that #39963 is fixed on MIR borrowck) Failed merges:
Fixes #51229.
r? @QuietMisdreavus