Skip to content

Commit

Permalink
Merge branch 'master' into feat/#6063/use-semver-to-check-required-ve…
Browse files Browse the repository at this point in the history
…rsion
  • Loading branch information
ologbonowiwi authored Feb 18, 2025
2 parents afdef69 + 2ad782c commit 1eacf2c
Show file tree
Hide file tree
Showing 187 changed files with 3,100 additions and 838 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
```
[style guide's version sorting algorithm]: https://doc.rust-lang.org/nightly/style-guide/#sorting
- When parsing rustfmt configurations fails, rustfmt will now include the path to the toml file in the erorr message [#6302](https://github.com/rust-lang/rustfmt/issues/6302)
- When parsing rustfmt configurations fails, rustfmt will now include the path to the toml file in the error message [#6302](https://github.com/rust-lang/rustfmt/issues/6302)

### Added
- rustfmt now formats trailing where clauses in type aliases [#5887](https://github.com/rust-lang/rustfmt/pull/5887)
Expand Down Expand Up @@ -133,7 +133,7 @@
### Changed

- `hide_parse_errors` has been soft deprecated and it's been renamed to `show_parse_errors` [#5961](https://github.com/rust-lang/rustfmt/pull/5961).
- The diff output produced by `rustfmt --check` is more compatable with editors that support navigating directly to line numbers [#5971](https://github.com/rust-lang/rustfmt/pull/5971)
- The diff output produced by `rustfmt --check` is more compatible with editors that support navigating directly to line numbers [#5971](https://github.com/rust-lang/rustfmt/pull/5971)
- When using `version=Two`, the `trace!` macro from the [log crate] is now formatted similarly to `debug!`, `info!`, `warn!`, and `error!` [#5987](https://github.com/rust-lang/rustfmt/issues/5987).

[log crate]: https://crates.io/crates/log
Expand Down
23 changes: 7 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rustfmt-format-diff = []
generic-simd = ["bytecount/generic-simd"]

[dependencies]
annotate-snippets = { version = "0.9", features = ["color"] }
annotate-snippets = { version = "0.11" }
anyhow = "1.0"
bytecount = "0.6.8"
cargo_metadata = "0.18"
Expand Down
52 changes: 51 additions & 1 deletion Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,56 @@ Control the case of the letters in hexadecimal literal values
- **Possible values**: `Preserve`, `Upper`, `Lower`
- **Stable**: No (tracking issue: [#5081](https://github.com/rust-lang/rustfmt/issues/5081))

## `float_literal_trailing_zero`

Control the presence of trailing zero in floating-point literal values

- **Default value**: `Preserve`
- **Possible values**: `Preserve`, `Always`, `IfNoPostfix`, `Never`
- **Stable**: No (tracking issue: [#6471](https://github.com/rust-lang/rustfmt/issues/6471))

#### `Preserve` (default):

Leave the literal as-is.

```rust
fn main() {
let values = [1.0, 2., 3.0e10, 4f32];
}
```

#### `Always`:

Add a trailing zero to the literal:

```rust
fn main() {
let values = [1.0, 2.0, 3.0e10, 4.0f32];
}
```

#### `IfNoPostfix`:

Add a trailing zero by default. If the literal contains an exponent or a suffix, the zero
and the preceding period are removed:

```rust
fn main() {
let values = [1.0, 2.0, 3e10, 4f32];
}
```

#### `Never`:

Remove the trailing zero. If the literal contains an exponent or a suffix, the preceding
period is also removed:

```rust
fn main() {
let values = [1., 2., 3e10, 4f32];
}
```

## `hide_parse_errors`

This option is deprecated and has been renamed to `show_parse_errors` to avoid confusion around the double negative default of `hide_parse_errors=false`.
Expand Down Expand Up @@ -3167,7 +3217,7 @@ Break comments to fit on the line

Note that no wrapping will happen if:
1. The comment is the start of a markdown header doc comment
2. An URL was found in the comment
2. A URL was found in the comment

- **Default value**: `false`
- **Possible values**: `true`, `false`
Expand Down
50 changes: 49 additions & 1 deletion check_diff/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion check_diff/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ edition = "2021"
clap = { version = "4.4.2", features = ["derive"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
[dev-dependencies]
tempfile = "3"
walkdir = "2.5.0"
diffy = "0.4.0"
Loading

0 comments on commit 1eacf2c

Please sign in to comment.