Skip to content

Commit 093e19f

Browse files
authored
Merge branch 'master' into cargo_toml
2 parents 1ad83c1 + a3b2bfc commit 093e19f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+875
-286
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@ indent_size = unset
2121
indent_style = unset
2222
trim_trailing_whitespace = unset
2323
insert_final_newline = unset
24-
25-
[appveyor.yml]
26-
end_of_line = unset

.github/workflows/upload-assets.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ jobs:
4646
shell: bash
4747

4848
- name: Build release binaries
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: build
52-
args: --release
49+
run: cargo build --release
5350

5451
- name: Build archive
5552
shell: bash

.travis.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
## [Unreleased]
44

5+
## [1.5.2] 2023-01-24
6+
7+
### Fixed
8+
9+
- Resolve issue when comments are found within const generic defaults in unit structs [#5668](https://github.com/rust-lang/rustfmt/issues/5668)
10+
- Resolve issue when block comments are found within trait generics [#5358](https://github.com/rust-lang/rustfmt/issues/5358)
11+
- Correctly handle alignment of comments containing unicode characters [#5504](https://github.com/rust-lang/rustfmt/issues/5504)
12+
- Properly indent a single generic bound that requires being written across multiple lines [#4689](https://github.com/rust-lang/rustfmt/issues/4689) (n.b. this change is version gated and will only appear when the `version` configuration option is set to `Two`)
13+
14+
### Changed
15+
16+
- Renamed `fn_args_layout` configuration option to `fn_params_layout` [#4149](https://github.com/rust-lang/rustfmt/issues/4149). Note that `fn_args_layout` has only been soft deprecated: `fn_args_layout` will continue to work without issue, but rustfmt will display a warning to encourage users to switch to the new name
17+
18+
### Added
19+
20+
- New configuration option (`skip_macro_invocations`)[https://rust-lang.github.io/rustfmt/?version=master&search=#skip_macro_invocations] [#5347](https://github.com/rust-lang/rustfmt/pull/5347) that can be used to globally define a single enumerated list of macro calls that rustfmt should skip formatting. rustfmt [currently also supports this via a custom tool attribute](https://github.com/rust-lang/rustfmt#tips), however, these cannot be used in all contexts because [custom inner attributes are unstable](https://github.com/rust-lang/rust/issues/54726)
21+
22+
### Misc
23+
24+
- rustfmt now internally supports the ability to have both stable and unstable variants of a configuration option [#5378](https://github.com/rust-lang/rustfmt/issues/5378). This ability will allow the rustfmt team to make certain configuration options available on stable toolchains more quickly because we no longer have to wait for _every_ variant to be stable-ready before stabilizing _any_ variant.
25+
26+
### Install/Download Options
27+
- **rustup (nightly)** - nightly-2023-01-24
28+
- **GitHub Release Binaries** - [Release v1.5.2](https://github.com/rust-lang/rustfmt/releases/tag/v1.5.2)
29+
- **Build from source** - [Tag v1.5.2](https://github.com/rust-lang/rustfmt/tree/v1.5.2), see instructions for how to [install rustfmt from source][install-from-source]
30+
531
## [1.5.1] 2022-06-24
632

733
**N.B** A bug was introduced in v1.5.0/nightly-2022-06-15 which modified formatting. If you happened to run rustfmt over your code with one of those ~10 nightlies it's possible you may have seen formatting changes, and you may see additional changes after this fix since that bug has now been reverted.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "rustfmt-nightly"
4-
version = "1.5.1"
4+
version = "1.5.2"
55
description = "Tool to find and fix Rust formatting issues"
66
repository = "https://github.com/rust-lang/rustfmt"
77
readme = "README.md"

Configurations.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,6 +3035,10 @@ See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_s
30353035

30363036
Break comments to fit on the line
30373037

3038+
Note that no wrapping will happen if:
3039+
1. The comment is the start of a markdown header doc comment
3040+
2. An URL was found in the comment
3041+
30383042
- **Default value**: `false`
30393043
- **Possible values**: `true`, `false`
30403044
- **Stable**: No (tracking issue: [#3347](https://github.com/rust-lang/rustfmt/issues/3347))
@@ -3049,6 +3053,11 @@ Break comments to fit on the line
30493053
// commodo consequat.
30503054

30513055
// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3056+
3057+
// Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text is: lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3058+
3059+
/// # This doc comment is a very long header (it starts with a '#'). Had it not been a header it would have been wrapped. But because it is a header, it will not be. That is because wrapping a markdown header breaks it.
3060+
struct Foo {}
30523061
```
30533062

30543063
#### `true`:
@@ -3059,6 +3068,17 @@ Break comments to fit on the line
30593068
// magna aliqua. Ut enim ad minim veniam, quis nostrud
30603069
// exercitation ullamco laboris nisi ut aliquip ex ea
30613070
// commodo consequat.
3071+
3072+
// Lorem ipsum dolor sit amet, consectetur adipiscing elit,
3073+
// sed do eiusmod tempor incididunt ut labore et dolore
3074+
// magna aliqua. Ut enim ad minim veniam, quis nostrud
3075+
// exercitation ullamco laboris nisi ut aliquip ex ea
3076+
// commodo consequat.
3077+
3078+
// Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text is: lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
3079+
3080+
/// # This doc comment is a very long header (it starts with a '#'). Had it not been a header it would have been wrapped. But because it is a header, it will not be. That is because wrapping a markdown header breaks it.
3081+
struct Foo {}
30623082
```
30633083

30643084
# Internal Options

Processes.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,3 @@ git tag -s v1.2.3 -m "Release 1.2.3"
5151
`cargo publish`
5252

5353
## 5. Create a PR to rust-lang/rust to update the rustfmt submodule
54-
55-
Note that if you are updating `rustc-ap-*` crates, then you need to update **every** submodules in the rust-lang/rust repository that depend on the crates to use the same version of those.
56-
57-
As of 2019/05, there are two such crates: `rls` and `racer` (`racer` depends on `rustc-ap-syntax` and `rls` depends on `racer`, and `rls` is one of submodules of the rust-lang/rust repository).

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# rustfmt [![Build Status](https://travis-ci.com/rust-lang/rustfmt.svg?branch=master)](https://travis-ci.com/rust-lang/rustfmt) [![Build Status](https://ci.appveyor.com/api/projects/status/github/rust-lang/rustfmt?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/rustfmt) [![crates.io](https://img.shields.io/crates/v/rustfmt-nightly.svg)](https://crates.io/crates/rustfmt-nightly) [![Travis Configuration Status](https://img.shields.io/travis/davidalber/rustfmt-travis.svg?label=travis%20example)](https://travis-ci.org/davidalber/rustfmt-travis)
1+
# rustfmt [![linux](https://github.com/rust-lang/rustfmt/actions/workflows/linux.yml/badge.svg?event=push)](https://github.com/rust-lang/rustfmt/actions/workflows/linux.yml) [![mac](https://github.com/rust-lang/rustfmt/actions/workflows/mac.yml/badge.svg?event=push)](https://github.com/rust-lang/rustfmt/actions/workflows/mac.yml) [![windows](https://github.com/rust-lang/rustfmt/actions/workflows/windows.yml/badge.svg?event=push)](https://github.com/rust-lang/rustfmt/actions/workflows/windows.yml) [![crates.io](https://img.shields.io/crates/v/rustfmt-nightly.svg)](https://crates.io/crates/rustfmt-nightly)
22

33
A tool for formatting Rust code according to style guidelines.
44

@@ -7,9 +7,7 @@ If you'd like to help out (and you should, it's a fun project!), see
77
Conduct](CODE_OF_CONDUCT.md).
88

99
You can use rustfmt in Travis CI builds. We provide a minimal Travis CI
10-
configuration (see [here](#checking-style-on-a-ci-server)) and verify its status
11-
using another repository. The status of that repository's build is reported by
12-
the "travis example" badge above.
10+
configuration (see [here](#checking-style-on-a-ci-server)).
1311

1412
## Quick start
1513

@@ -135,7 +133,7 @@ completed without error (whether or not changes were made).
135133
* [Emacs](https://github.com/rust-lang/rust-mode)
136134
* [Sublime Text 3](https://packagecontrol.io/packages/RustFmt)
137135
* [Atom](atom.md)
138-
* Visual Studio Code using [vscode-rust](https://github.com/editor-rs/vscode-rust), [vsc-rustfmt](https://github.com/Connorcpu/vsc-rustfmt) or [rls_vscode](https://github.com/jonathandturner/rls_vscode) through RLS.
136+
* [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
139137
* [IntelliJ or CLion](intellij.md)
140138

141139

atom.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Running Rustfmt from Atom
22

3-
## RLS
3+
## rust-analyzer
44

5-
Rustfmt is included with the Rust Language Server, itself provided by [ide-rust](https://atom.io/packages/ide-rust).
5+
Rustfmt can be utilized from [rust-analyzer](https://rust-analyzer.github.io/) which is provided by [ide-rust](https://atom.io/packages/ide-rust).
66

77
`apm install ide-rust`
88

0 commit comments

Comments
 (0)