You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,32 @@
2
2
3
3
## [Unreleased]
4
4
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.
-**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
+
5
31
## [1.5.1] 2022-06-24
6
32
7
33
**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.
Copy file name to clipboardExpand all lines: Configurations.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3035,6 +3035,10 @@ See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_s
3035
3035
3036
3036
Break comments to fit on the line
3037
3037
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
+
3038
3042
-**Default value**: `false`
3039
3043
-**Possible values**: `true`, `false`
3040
3044
-**Stable**: No (tracking issue: [#3347](https://github.com/rust-lang/rustfmt/issues/3347))
@@ -3049,6 +3053,11 @@ Break comments to fit on the line
3049
3053
// commodo consequat.
3050
3054
3051
3055
// 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
+
structFoo {}
3052
3061
```
3053
3062
3054
3063
#### `true`:
@@ -3059,6 +3068,17 @@ Break comments to fit on the line
3059
3068
// magna aliqua. Ut enim ad minim veniam, quis nostrud
3060
3069
// exercitation ullamco laboris nisi ut aliquip ex ea
3061
3070
// 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.
## 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).
*[Sublime Text 3](https://packagecontrol.io/packages/RustFmt)
137
135
*[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)
0 commit comments