Skip to content

Avoid extraneous space between visibility kw and ident for statics - #77920

Merged
bors merged 2 commits into
rust-lang:masterfrom
ayazhafiz:i/mut-ident-spacing
Oct 23, 2020
Merged

Avoid extraneous space between visibility kw and ident for statics#77920
bors merged 2 commits into
rust-lang:masterfrom
ayazhafiz:i/mut-ident-spacing

Conversation

@ayazhafiz

Copy link
Copy Markdown
Contributor

Today, given a static like static mut FOO: usize = 1, rustdoc would
emit static mut FOO: usize = 1, as it emits both the mutability kw
with a space and reserves a space after the mutability kw. This patch
fixes that misformatting.

This patch also adds some tests for emit of other statics, as I could
not find an existing test devoted to statics.

Today, given a static like `static mut FOO: usize = 1`, rustdoc would
emit `static mut FOO: usize = 1`, as it emits both the mutability kw
with a space and reserves a space after the mutability kw. This patch
fixes that misformatting.
This patch also adds some tests for emit of other statics, as I could
not find an existing test devoted to statics.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @GuillaumeGomez

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 13, 2020
@ayazhafiz

Copy link
Copy Markdown
ContributorAuthor

(tests still building locally, leap of faith this is valid..)

@ayazhafiz

Copy link
Copy Markdown
ContributorAuthor

r? @jyn514
can you ptal?

@jyn514jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 22, 2020
@jyn514

Copy link
Copy Markdown
Member

I think you have a typo in the title, it has one space in both. Changes look good though!

@bors r+ rollup

@bors

bors commented Oct 22, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e60072f has been approved by jyn514

@borsbors 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 Oct 22, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 22, 2020
…n514
Avoid extraneous space between visibility kw and ident for statics
Today, given a static like `static mut FOO: usize = 1`, rustdoc would
emit `static mut FOO: usize = 1`, as it emits both the mutability kw
with a space and reserves a space after the mutability kw. This patch
fixes that misformatting.
This patch also adds some tests for emit of other statics, as I could
not find an existing test devoted to statics.
@JohnTitorJohnTitor mentioned this pull request Oct 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 23, 2020
Rollup of 17 pull requests
Successful merges:
- rust-lang#77268 (Link to "Contributing to Rust" rather than "Getting Started".)
- rust-lang#77339 (Implement TryFrom between NonZero types.)
- rust-lang#77488 (Mark `repr128` as `incomplete_features`)
- rust-lang#77890 (Fixing escaping to ensure generation of welformed json.)
- rust-lang#77918 (Cleanup network tests)
- rust-lang#77920 (Avoid extraneous space between visibility kw and ident for statics)
- rust-lang#77969 (Doc formating consistency between slice sort and sort_unstable, and big O notation consistency)
- rust-lang#78098 (Clean up and improve some docs)
- rust-lang#78116 (Make inline const work in range patterns)
- rust-lang#78153 (Sync LLVM submodule if it has been initialized)
- rust-lang#78163 (Clean up lib docs)
- rust-lang#78169 (Update cargo)
- rust-lang#78231 (Make closures inherit the parent function's target features)
- rust-lang#78235 (Explain where the closure return type was inferred)
- rust-lang#78255 (Reduce diagram mess in 'match arms have incompatible types' error)
- rust-lang#78263 (Add regression test of issue-77668)
- rust-lang#78265 (Add some inference-related regression tests about incorrect diagnostics)
Failed merges:
r? `@ghost`
@bors
bors merged commit 4704259 into rust-lang:masterOct 23, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ayazhafiz@rust-highfive@jyn514@bors@GuillaumeGomez@rustbot