Skip to content

Commit e84c9ae

Browse files
author
Alexander Melentyev
committed
Delete spaces
1 parent fb3ea63 commit e84c9ae

File tree

18 files changed

+48
-48
lines changed

18 files changed

+48
-48
lines changed

.github/ISSUE_TEMPLATE/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ along with any information you feel relevant to replicating the bug.
99
1010
If you cannot produce a minimal reproduction case (something that would work in
1111
isolation), please provide the steps or even link to a repository that causes
12-
the problematic output to occur.
12+
the problematic output to occur.
1313
-->
1414

1515
Given the following code: <!-- Please provide a link to play.rust-lang.org -->

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Read ["Installation"] from [The Book].
2121
The Rust build system uses a Python script called `x.py` to build the compiler,
2222
which manages the bootstrapping process. It lives in the root of the project.
2323

24-
The `x.py` command can be run directly on most systems in the following format:
24+
The `x.py` command can be run directly on most systems in the following format:
2525

2626
```sh
2727
./x.py <subcommand> [flags]

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Language
174174
--------
175175
- [You can now parameterize items such as functions, traits, and `struct`s by constant
176176
values in addition to by types and lifetimes.][79135] Also known as "const generics"
177-
E.g. you can now write the following. Note: Only values of primitive integers,
177+
E.g. you can now write the following. Note: Only values of primitive integers,
178178
`bool`, or `char` types are currently permitted.
179179
```rust
180180
struct GenericArray<T, const LENGTH: usize> {

config.toml.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@ changelog-seen = 2
567567
# On Linux target, if crt-static is not enabled, 'no' means dynamic link to
568568
# `libgcc_s.so`, 'in-tree' means static link to the in-tree build of llvm libunwind
569569
# and 'system' means dynamic link to `libunwind.so`. If crt-static is enabled,
570-
# the behavior is depend on the libc. On musl target, 'no' and 'in-tree' both
571-
# means static link to the in-tree build of llvm libunwind, and 'system' means
570+
# the behavior is depend on the libc. On musl target, 'no' and 'in-tree' both
571+
# means static link to the in-tree build of llvm libunwind, and 'system' means
572572
# static link to `libunwind.a` provided by system. Due to the limitation of glibc,
573573
# it must link to `libgcc_eh.a` to get a working output, and this option have no effect.
574574
#llvm-libunwind = 'no'

src/librustdoc/html/static/FiraSans-LICENSE.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
2-
with Reserved Font Name < Fira >,
2+
with Reserved Font Name < Fira >,
33

44
This Font Software is licensed under the SIL Open Font License, Version 1.1.
55
This license is copied below, and is also available with a FAQ at:
@@ -19,7 +19,7 @@ with others.
1919

2020
The OFL allows the licensed fonts to be used, studied, modified and
2121
redistributed freely as long as they are not sold by themselves. The
22-
fonts, including any derivative works, can be bundled, embedded,
22+
fonts, including any derivative works, can be bundled, embedded,
2323
redistributed and/or sold with any software provided that any reserved
2424
names are not used by derivative works. The fonts and derivatives,
2525
however, cannot be released under any other type of license. The

src/tools/clippy/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ We have prioritization labels and a sync-blocker label, which are described belo
342342
- [P-low][p-low]: Requires attention (fix/response/evaluation) by a team member but isn't urgent.
343343
- [P-medium][p-medium]: Should be addressed by a team member until the next sync.
344344
- [P-high][p-high]: Should be immediately addressed and will require an out-of-cycle sync or a backport.
345-
- [L-sync-blocker][l-sync-blocker]: An issue that "blocks" a sync.
345+
- [L-sync-blocker][l-sync-blocker]: An issue that "blocks" a sync.
346346
Or rather: before the sync this should be addressed,
347347
e.g. by removing a lint again, so it doesn't hit beta/stable.
348348

src/tools/clippy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ As with `cargo check`, this includes dependencies that are members of the worksp
9595
If you want to run Clippy **only** on the given crate, use the `--no-deps` option like this:
9696

9797
```terminal
98-
cargo clippy -p example -- --no-deps
98+
cargo clippy -p example -- --no-deps
9999
```
100100

101101
### As a rustc replacement (`clippy-driver`)

src/tools/clippy/clippy_utils/src/ast_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
178178
(Path(lq, lp), Path(rq, rp)) => both(lq, rq, |l, r| eq_qself(l, r)) && eq_path(lp, rp),
179179
(MacCall(l), MacCall(r)) => eq_mac_call(l, r),
180180
(Struct(lse), Struct(rse)) => {
181-
eq_maybe_qself(&lse.qself, &rse.qself)
181+
eq_maybe_qself(&lse.qself, &rse.qself)
182182
&& eq_path(&lse.path, &rse.path)
183183
&& eq_struct_rest(&lse.rest, &rse.rest)
184184
&& unordered_over(&lse.fields, &rse.fields, |l, r| eq_field(l, r))

src/tools/clippy/doc/basics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ cargo dev ide_setup
9696

9797
## lintcheck
9898
`cargo lintcheck` will build and run clippy on a fixed set of crates and generate a log of the results.
99-
You can `git diff` the updated log against its previous version and
99+
You can `git diff` the updated log against its previous version and
100100
see what impact your lint made on a small set of crates.
101-
If you add a new lint, please audit the resulting warnings and make sure
101+
If you add a new lint, please audit the resulting warnings and make sure
102102
there are no false positives and that the suggestions are valid.
103103

104104
Refer to the tools [README] for more details.

src/tools/clippy/lintcheck/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ You can run `./lintcheck/target/debug/lintcheck --fix` which will run Clippy wit
7373
print a warning if Clippys suggestions fail to apply (if the resulting code does not build).
7474
This lets us spot bad suggestions or false positives automatically in some cases.
7575

76-
Please note that the target dir should be cleaned afterwards since clippy will modify
76+
Please note that the target dir should be cleaned afterwards since clippy will modify
7777
the downloaded sources which can lead to unexpected results when running lintcheck again afterwards.

src/tools/clippy/util/gh-pages/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ <h4 class="list-group-item-heading">
363363

364364
$scope.bySearch = function (lint, index, array) {
365365
let searchStr = $scope.search;
366-
// It can be `null` I haven't missed this value
366+
// It can be `null` I haven't missed this value
367367
if (searchStr == null || searchStr.length < 3) {
368368
return true;
369369
}
@@ -375,7 +375,7 @@ <h4 class="list-group-item-heading">
375375
}
376376

377377
// Search the description
378-
// The use of `for`-loops instead of `foreach` enables us to return early
378+
// The use of `for`-loops instead of `foreach` enables us to return early
379379
let terms = searchStr.split(" ");
380380
for (index = 0; index < terms.length; index++) {
381381
if (lint.id.indexOf(terms[index]) !== -1) {
@@ -463,7 +463,7 @@ <h4 class="list-group-item-heading">
463463

464464
let children = themeMenu.children;
465465
for (let index = 0; index < children.length; index++) {
466-
let child = children[index];
466+
let child = children[index];
467467
child.addEventListener("click", function(e) {
468468
setTheme(child.id, true);
469469
});
@@ -476,7 +476,7 @@ <h4 class="list-group-item-heading">
476476
let enableHighlight = false;
477477
let enableNight = false;
478478
let enableAyu = false;
479-
479+
480480
if (theme == "ayu") {
481481
enableAyu = true;
482482
} else if (theme == "coal" || theme == "navy") {

src/tools/rustfmt/CHANGELOG.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ https://rust-lang.github.io/rustfmt/?version=v1.4.33&search=#imports_granularity
176176

177177
### Changed
178178

179-
- Original comment indentation for trailing comments within an `if` is now taken into account when determining the indentation level to use for the trailing comment in formatted code. This does not modify any existing code formatted with rustfmt; it simply gives the programmer discretion to specify whether the comment is associated to the `else` block, or if the trailing comment is just a member of the `if` block. ([#1575](https://github.com/rust-lang/rustfmt/issues/1575), [#4120](https://github.com/rust-lang/rustfmt/issues/4120), [#4506](https://github.com/rust-lang/rustfmt/issues/4506))
179+
- Original comment indentation for trailing comments within an `if` is now taken into account when determining the indentation level to use for the trailing comment in formatted code. This does not modify any existing code formatted with rustfmt; it simply gives the programmer discretion to specify whether the comment is associated to the `else` block, or if the trailing comment is just a member of the `if` block. ([#1575](https://github.com/rust-lang/rustfmt/issues/1575), [#4120](https://github.com/rust-lang/rustfmt/issues/4120), [#4506](https://github.com/rust-lang/rustfmt/issues/4506))
180180

181181
In this example the `// else comment` refers to the `else`:
182182
```rust
@@ -213,7 +213,7 @@ if toks.eat_token(Token::Word("modify"))? && toks.eat_token(Token::Word("labels"
213213

214214
### Fixed
215215
- Formatting of empty blocks with attributes which only contained comments is no longer butchered.([#4475](https://github.com/rust-lang/rustfmt/issues/4475), [#4467](https://github.com/rust-lang/rustfmt/issues/4467), [#4452](https://github.com/rust-lang/rustfmt/issues/4452#issuecomment-705886282), [#4522](https://github.com/rust-lang/rustfmt/issues/4522))
216-
- Indentation of trailing comments in non-empty extern blocks is now correct. ([#4120](https://github.com/rust-lang/rustfmt/issues/4120#issuecomment-696491872))
216+
- Indentation of trailing comments in non-empty extern blocks is now correct. ([#4120](https://github.com/rust-lang/rustfmt/issues/4120#issuecomment-696491872))
217217

218218
### Install/Download Options
219219
- **crates.io package** - *pending*
@@ -297,7 +297,7 @@ if toks.eat_token(Token::Word("modify"))? && toks.eat_token(Token::Word("labels"
297297
- Fix aligning comments of different group
298298
- Fix flattening imports with a single `self`.
299299
- Fix removing attributes on function parameters.
300-
- Fix removing `impl` keyword from opaque type.
300+
- Fix removing `impl` keyword from opaque type.
301301

302302
## [1.4.8] 2019-09-08
303303

@@ -329,7 +329,7 @@ if toks.eat_token(Token::Word("modify"))? && toks.eat_token(Token::Word("labels"
329329

330330
- Add `--message-format` command line option to `cargo-fmt`.
331331
- Add `-l,--files-with-diff` command line option to `rustfmt`.
332-
- Add `json` emit mode.
332+
- Add `json` emit mode.
333333

334334
### Fixed
335335

@@ -380,7 +380,7 @@ if toks.eat_token(Token::Word("modify"))? && toks.eat_token(Token::Word("labels"
380380

381381
### Added
382382

383-
- Add new attribute `rustfmt::skip::attributes` to prevent rustfmt
383+
- Add new attribute `rustfmt::skip::attributes` to prevent rustfmt
384384
from formatting an attribute #3665
385385

386386
### Changed

src/tools/rustfmt/Configurations.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@ To enable unstable options, set `unstable_features = true` in `rustfmt.toml` or
1717

1818
Below you find a detailed visual guide on all the supported configuration options of rustfmt:
1919

20-
## `array_width`
20+
## `array_width`
2121

2222
Maximum width of an array literal before falling back to vertical formatting.
2323

2424
- **Default value**: `60`
2525
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
2626
- **Stable**: Yes
2727

28-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `array_width` will take precedence.
28+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `array_width` will take precedence.
2929

3030
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
3131

32-
## `attr_fn_like_width`
32+
## `attr_fn_like_width`
3333

3434
Maximum width of the args of a function-like attributes before falling back to vertical formatting.
3535

3636
- **Default value**: `70`
3737
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
3838
- **Stable**: Yes
3939

40-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `attr_fn_like_width` will take precedence.
40+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `attr_fn_like_width` will take precedence.
4141

4242
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
4343

@@ -295,15 +295,15 @@ where
295295
}
296296
```
297297

298-
## `chain_width`
298+
## `chain_width`
299299

300300
Maximum width of a chain to fit on one line.
301301

302302
- **Default value**: `60`
303303
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
304304
- **Stable**: Yes
305305

306-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `chain_width` will take precedence.
306+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `chain_width` will take precedence.
307307

308308
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
309309

@@ -751,15 +751,15 @@ trait Lorem {
751751
}
752752
```
753753

754-
## `fn_call_width`
754+
## `fn_call_width`
755755

756756
Maximum width of the args of a function call before falling back to vertical formatting.
757757

758758
- **Default value**: `60`
759759
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
760760
- **Stable**: Yes
761761

762-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `fn_call_width` will take precedence.
762+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `fn_call_width` will take precedence.
763763

764764
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
765765

@@ -2124,15 +2124,15 @@ Don't reformat out of line modules
21242124
- **Possible values**: `true`, `false`
21252125
- **Stable**: No (tracking issue: #3389)
21262126

2127-
## `single_line_if_else_max_width`
2127+
## `single_line_if_else_max_width`
21282128

21292129
Maximum line length for single line if-else expressions. A value of `0` (zero) results in if-else expressions always being broken into multiple lines. Note this occurs when `use_small_heuristics` is set to `Off`.
21302130

21312131
- **Default value**: `50`
21322132
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
21332133
- **Stable**: Yes
21342134

2135-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `single_line_if_else_max_width` will take precedence.
2135+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `single_line_if_else_max_width` will take precedence.
21362136

21372137
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
21382138

@@ -2313,27 +2313,27 @@ fn main() {
23132313

23142314
See also: [`indent_style`](#indent_style).
23152315

2316-
## `struct_lit_width`
2316+
## `struct_lit_width`
23172317

23182318
Maximum width in the body of a struct literal before falling back to vertical formatting. A value of `0` (zero) results in struct literals always being broken into multiple lines. Note this occurs when `use_small_heuristics` is set to `Off`.
23192319

23202320
- **Default value**: `18`
23212321
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
23222322
- **Stable**: Yes
23232323

2324-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `struct_lit_width` will take precedence.
2324+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `struct_lit_width` will take precedence.
23252325

23262326
See also [`max_width`](#max_width), [`use_small_heuristics`](#use_small_heuristics), and [`struct_lit_single_line`](#struct_lit_single_line)
23272327

2328-
## `struct_variant_width`
2328+
## `struct_variant_width`
23292329

23302330
Maximum width in the body of a struct variant before falling back to vertical formatting. A value of `0` (zero) results in struct literals always being broken into multiple lines. Note this occurs when `use_small_heuristics` is set to `Off`.
23312331

23322332
- **Default value**: `35`
23332333
- **Possible values**: any positive integer that is less than or equal to the value specified for [`max_width`](#max_width)
23342334
- **Stable**: Yes
23352335

2336-
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `struct_variant_width` will take precedence.
2336+
By default this option is set as a percentage of [`max_width`](#max_width) provided by [`use_small_heuristics`](#use_small_heuristics), but a value set directly for `struct_variant_width` will take precedence.
23372337

23382338
See also [`max_width`](#max_width) and [`use_small_heuristics`](#use_small_heuristics)
23392339

@@ -2530,7 +2530,7 @@ fn main() {
25302530

25312531
This option can be used to simplify the management and bulk updates of the granular width configuration settings ([`fn_call_width`](#fn_call_width), [`attr_fn_like_width`](#attr_fn_like_width), [`struct_lit_width`](#struct_lit_width), [`struct_variant_width`](#struct_variant_width), [`array_width`](#array_width), [`chain_width`](#chain_width), [`single_line_if_else_max_width`](#single_line_if_else_max_width)), that respectively control when formatted constructs are multi-lined/vertical based on width.
25322532

2533-
Note that explicitly provided values for the width configuration settings take precedence and override the calculated values determined by `use_small_heuristics`.
2533+
Note that explicitly provided values for the width configuration settings take precedence and override the calculated values determined by `use_small_heuristics`.
25342534

25352535
- **Default value**: `"Default"`
25362536
- **Possible values**: `"Default"`, `"Off"`, `"Max"`
@@ -2595,7 +2595,7 @@ fn main() {
25952595
```
25962596

25972597
#### `Off`:
2598-
When `use_small_heuristics` is set to `Off`, the granular width settings are functionally disabled and ignored. See the documentation for the respective width config options for specifics.
2598+
When `use_small_heuristics` is set to `Off`, the granular width settings are functionally disabled and ignored. See the documentation for the respective width config options for specifics.
25992599

26002600
```rust
26012601
enum Lorem {

src/tools/rustfmt/Contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ colourised diff will be printed so that the offending line(s) can quickly be
3838
identified.
3939

4040
Without explicit settings, the tests will be run using rustfmt's default
41-
configuration. It is possible to run a test using non-default settings in several
41+
configuration. It is possible to run a test using non-default settings in several
4242
ways. Firstly, you can include configuration parameters in comments at the top
4343
of the file. For example: to use 3 spaces per tab, start your test with
4444
`// rustfmt-tab_spaces: 3`. Just remember that the comment is part of the input,

src/tools/rustfmt/Design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ for its configuration.
150150

151151
Our visitor keeps track of the desired current indent due to blocks (
152152
`block_indent`). Each `visit_*` method reformats code according to this indent,
153-
`config.comment_width()` and `config.max_width()`. Most reformatting that is done
154-
in the `visit_*` methods is a bit hacky and is meant to be temporary until it can
153+
`config.comment_width()` and `config.max_width()`. Most reformatting that is done
154+
in the `visit_*` methods is a bit hacky and is meant to be temporary until it can
155155
be done properly.
156156

157157
There are a bunch of methods called `rewrite_*`. They do the bulk of the

src/tools/rustfmt/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ needs to be specified in `rustfmt.toml`, e.g., with `edition = "2018"`.
180180

181181
* For things you do not want rustfmt to mangle, use `#[rustfmt::skip]`
182182
* To prevent rustfmt from formatting a macro or an attribute,
183-
use `#[rustfmt::skip::macros(target_macro_name)]` or
183+
use `#[rustfmt::skip::macros(target_macro_name)]` or
184184
`#[rustfmt::skip::attributes(target_attribute_name)]`
185185

186186
Example:
187187

188188
```rust
189-
#![rustfmt::skip::attributes(custom_attribute)]
189+
#![rustfmt::skip::attributes(custom_attribute)]
190190
191191
#[custom_attribute(formatting , here , should , be , Skipped)]
192192
#[rustfmt::skip::macros(html)]

0 commit comments

Comments
 (0)