Skip to content
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

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 31, 2018
@@ -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 }
Copy link
Member

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?

Copy link
Member Author

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...

@QuietMisdreavus
Copy link
Member

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.

@GuillaumeGomez
Copy link
Member Author

That's the case of most rustdoc options. The rustc function isn't at fault, the option handling on rustdoc's side is.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-rustdoc-crate-name branch from 89264fa to 3cbcc5a Compare June 4, 2018 21:05
@QuietMisdreavus
Copy link
Member

Thanks! r=me pending travis.

@GuillaumeGomez
Copy link
Member Author

@bors: r=QuietMisdreavus

@bors
Copy link
Contributor

bors commented Jun 5, 2018

📌 Commit 3cbcc5a has been approved by QuietMisdreavus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 5, 2018
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 5, 2018
…me, r=QuietMisdreavus

Fix crate-name option in rustdoc

Fixes rust-lang#51229.

r? @QuietMisdreavus
bors added a commit that referenced this pull request Jun 5, 2018
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:
@bors bors merged commit 3cbcc5a into rust-lang:master Jun 5, 2018
@GuillaumeGomez GuillaumeGomez deleted the fix-rustdoc-crate-name branch June 5, 2018 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants