]>
git.lizzy.rs Git - rust.git/log
Outvi V [Thu, 22 Jul 2021 13:24:07 +0000 (21:24 +0800)]
fix: make --edition 2021 visible in --help
Caleb Cartwright [Tue, 27 Jul 2021 02:17:15 +0000 (21:17 -0500)]
ci: remove unnecessary cargo-make install on windows jobs
Caleb Cartwright [Mon, 26 Jul 2021 03:27:33 +0000 (22:27 -0500)]
chore: bump toolchain
Elliot Bobrow [Mon, 19 Jul 2021 21:50:05 +0000 (14:50 -0700)]
fix link in Contributing.md
Caleb Cartwright [Sun, 18 Jul 2021 17:14:23 +0000 (12:14 -0500)]
chore: disable clippy::matches_like_macro lint
Matthias Krüger [Sun, 18 Jul 2021 08:44:39 +0000 (10:44 +0200)]
fix a bunch of clippy warnings
clippy::bind_instead_of_map
clippy::branches_sharing_code
clippy::collapsible_match
clippy::inconsistent_struct_constructor
clippy::int_plus_one
clippy::iter_count
clippy::iter_nth_zero
clippy::manual_range_contains
clippy::match_like_matches_macro
clippy::needless::collect
clippy::needless_question_mark
clippy::needless_return
clippy::op_ref
clippy::option_as_ref_deref
clippy::ptr_arg
clippy::redundant_clone
clippy::redundant_closure
clippy::redundant_static_lifetimes
clippy::search_is_some
clippy::#single_char_add_str
clippy::single_char_pattern
clippy::single_component_path_imports
clippy::single_match
clippy::skip_while_next
clippy::unnecessary_lazy_evaluations
clippy::unnecessary_unwrap
clippy::useless_conversion
clippy::useless_format
Caleb Cartwright [Mon, 5 Jul 2021 03:26:08 +0000 (22:26 -0500)]
docs: clarify match_arm_blocks config documentation
Jethro Beekman [Fri, 25 Jun 2021 14:17:43 +0000 (16:17 +0200)]
Change line endings from CRLF to LF
Caleb Cartwright [Thu, 24 Jun 2021 23:22:28 +0000 (18:22 -0500)]
fix: correct arm leading pipe check (#4880)
In the event a pattern starts with a leading pipe
the pattern span will contain, and begin with, the pipe.
This updates the process to see if a match arm contains
a leading pipe by leveraging this recent(ish) change to
the patterns in the AST, and avoids an indexing bug that
occurs when a pattern starts with a non-ascii char in the
old implementation.
Michael Murphy [Wed, 16 Jun 2021 03:33:34 +0000 (04:33 +0100)]
Updating outdated links (#4869)
* Updating outdated links
Updating the links to the docs and source code for `ast.rs`. Seems like it was moved to a new crate at some point.
* Updating more outdated links
This time, the links to the `fmt-rfcs` repository, which is now owned by
`rust-dev-tools` (although GitHub was redirecting anyway).
* Update Contributing.md
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Michael Murphy [Fri, 11 Jun 2021 01:39:28 +0000 (02:39 +0100)]
Adjusting help message (#4865)
On stable, running with `--help|-h` shows information about `file-lines`
which is a nightly-only option. This commit removes all mention of
`file-lines` from the help message on stable.
There is room for improvement here; perhaps a new struct called, e.g.,
`StableOptions` could be added to complement the existing
`GetOptsOptions` struct. `StableOptions` could have a field for each
field in `GetOptsOptions`, with each field's value being a `bool` that
specifies whether or not the option exists on stable. Or is this adding
too much complexity?
Casey Rodarmor [Mon, 10 May 2021 03:01:24 +0000 (20:01 -0700)]
Improve pasta copyability of `merge_imports` deprecation message
Add double quotes around `Crate` so that it can be copied directly into a `Cargo.toml` file
Ruby Lazuli [Sat, 22 May 2021 13:22:42 +0000 (08:22 -0500)]
Allow `--edition 2021` to be passed to rustfmt
This was added to Configurations.md in #4618, but the option wasn't
actually made available. This should let people who are using Rust 2021
on nightly rustc run `cargo fmt` again.
Caleb Cartwright [Mon, 26 Jul 2021 00:50:31 +0000 (19:50 -0500)]
Merge pull request #4920 from calebcartwright/subtree-sync
subtree sync
Camille GILLOT [Fri, 25 Jun 2021 18:43:04 +0000 (20:43 +0200)]
Use LocalExpnId where possible.
Guillaume Gomez [Wed, 5 May 2021 19:31:25 +0000 (21:31 +0200)]
Rework SESSION_GLOBALS API to prevent overwriting it
Joshua Nelson [Wed, 30 Jun 2021 04:13:34 +0000 (00:13 -0400)]
Document rustfmt on nightly-rustc
The recursion_limit attribute avoids the following error:
```
error[E0275]: overflow evaluating the requirement `std::ptr::Unique<rustc_ast::Pat>: std::marker::Send`
|
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`rustfmt_nightly`)
```
Yuki Okushi [Mon, 21 Jun 2021 15:00:41 +0000 (00:00 +0900)]
Rollup merge of #86424 - calebcartwright:rustfmt-mod-resolution, r=Mark-Simulacrum
rustfmt: load nested out-of-line mods correctly
This should address https://github.com/rust-lang/rustfmt/issues/4874
r? `@Mark-Simulacrum`
Decided to make the change directly in tree here for expediency/to minimize any potential backporting issues, and because there's some subtree sync items I need to get resolved before pulling from r-l/rustfmt
Yuki Okushi [Mon, 21 Jun 2021 15:00:38 +0000 (00:00 +0900)]
Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3
Spaces
Alexander Melentyev [Mon, 21 Jun 2021 09:11:37 +0000 (12:11 +0300)]
Delete spaces
Caleb Cartwright [Fri, 18 Jun 2021 03:35:19 +0000 (22:35 -0500)]
fix(rustfmt): load nested out-of-line mods correctly
Yuki Okushi [Wed, 16 Jun 2021 22:11:13 +0000 (07:11 +0900)]
Use `AttrVec` for `Arm`, `FieldDef`, and `Variant`
Ryan Levick [Thu, 10 Dec 2020 12:20:07 +0000 (13:20 +0100)]
Add support for using qualified paths with structs in expression and pattern
position.
jedel1043 [Mon, 17 May 2021 03:13:38 +0000 (22:13 -0500)]
Allow formatting `Anonymous{Struct, Union}` declarations
Joshua Nelson [Sun, 2 May 2021 20:56:25 +0000 (16:56 -0400)]
Update log to 0.4.14
This avoids the following warning:
```
warning: trailing semicolon in macro used in expression position
--> /home/joshua/.local/lib/cargo/registry/src/github.com-
1ecc6299db9ec823 /log-0.4.11/src/macros.rs:152:45
|
147 | / macro_rules! debug {
148 | | (target: $target:expr, $($arg:tt)+) => (
149 | | log!(target: $target, $crate::Level::Debug, $($arg)+);
150 | | );
151 | | ($($arg:tt)+) => (
152 | | log!($crate::Level::Debug, $($arg)+);
| | ^
153 | | )
154 | | }
| |_- in this expansion of `debug!`
|
::: src/tools/rustfmt/src/modules/visitor.rs:36:23
|
36 | Err(e) => debug!("{}", e),
| --------------- in this macro invocation
|
= note: requested on the command line with `-W semicolon-in-expressions-from-macros`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
```
Caleb Cartwright [Fri, 14 May 2021 23:18:12 +0000 (18:18 -0500)]
chore: update gitattributes for files with windows style line endings
Andy Wang [Wed, 12 May 2021 22:19:00 +0000 (23:19 +0100)]
Bump nightly version
Andy Wang [Tue, 4 May 2021 12:37:28 +0000 (13:37 +0100)]
Rename `RealFileName::Named` to `LocalPath`
Andy Wang [Tue, 4 May 2021 12:34:19 +0000 (13:34 +0100)]
Only deal with LocalPath in conversion
Andy Wang [Tue, 4 May 2021 11:06:02 +0000 (12:06 +0100)]
Rename span_to_string to span_to_diagnostic_string
Caleb Cartwright [Tue, 4 May 2021 23:06:53 +0000 (18:06 -0500)]
tests: remove snippets with inner attrs on non-block expressions
Caleb Cartwright [Sun, 2 May 2021 15:03:25 +0000 (10:03 -0500)]
fix: backport changes for latest rustc api comaptibility
Yuki Okushi [Thu, 22 Apr 2021 13:33:36 +0000 (22:33 +0900)]
Upgrade `annotate-snippets` to 0.8 (#4762)
ChinYing-Li [Wed, 21 Apr 2021 06:08:57 +0000 (14:08 +0800)]
Add the case in duplicate issue (#4806) to the idempotent tests
ChinYing-Li [Mon, 12 Apr 2021 09:26:18 +0000 (17:26 +0800)]
Recognize when a block comment has been ended inside a string literal (#4312)
Joseph Birr-Pixton [Fri, 2 Apr 2021 10:06:35 +0000 (11:06 +0100)]
Add some basic tests for chain_width use
Caleb Cartwright [Sat, 18 Apr 2020 03:39:44 +0000 (22:39 -0500)]
refactor: remove panics on misconfigured widths
Caleb Cartwright [Sun, 23 Feb 2020 05:05:58 +0000 (23:05 -0600)]
tests: augment heuristics tests
Caleb Cartwright [Sun, 23 Feb 2020 04:07:50 +0000 (22:07 -0600)]
refactor: apply heuristic config changes in lib
Caleb Cartwright [Sun, 23 Feb 2020 04:05:07 +0000 (22:05 -0600)]
feat(config): expose all width heurstic options
Caleb Cartwright [Sun, 23 Feb 2020 04:01:48 +0000 (22:01 -0600)]
docs: update configuration info
Joshua Nelson [Wed, 17 Feb 2021 18:29:00 +0000 (13:29 -0500)]
Use rustup in CI to automatically determine the toolchain version needed
This also removes the (now unused) `RUSTC_RELEASE` and
`RUSTC_RELEASE_CHANNEL` variables.
Joshua Nelson [Wed, 17 Feb 2021 04:50:30 +0000 (23:50 -0500)]
Fix errors when `parallel_compiler` is enabled
Joshua Nelson [Wed, 17 Feb 2021 03:25:41 +0000 (22:25 -0500)]
Use `rustc_private` instead of crates.io dependencies
- Update rust-toolchain to also install `rustc-dev` component
Joshua Nelson [Wed, 17 Feb 2021 02:59:28 +0000 (21:59 -0500)]
Don't show CRLF tests as modified in the working directory
This was being overriden by `lf=eof` in `.gitattributes` in the root
directory. Override it again to avoid warnings like this:
```
$ git diff src/tools/rustfmt/tests/target/issue-3494/crlf.rs
warning: CRLF will be replaced by LF in src/tools/rustfmt/tests/target/issue-3494/crlf.rs.
The file will have its original line endings in your working directory
```
Caleb Cartwright [Sat, 3 Apr 2021 04:41:27 +0000 (23:41 -0500)]
chore: bump version and changelog
Caleb Cartwright [Sat, 27 Mar 2021 17:57:58 +0000 (12:57 -0500)]
chore: bump toolchain
Caleb Cartwright [Sun, 28 Mar 2021 22:30:53 +0000 (17:30 -0500)]
chore: fmt and cleanup
Caleb Cartwright [Sat, 27 Mar 2021 17:19:05 +0000 (12:19 -0500)]
deps: apply rustc-ap-* v712 changes
Caleb Cartwright [Sat, 27 Mar 2021 17:17:09 +0000 (12:17 -0500)]
chore: bump rustc-ap crates to v712
Caleb Cartwright [Sun, 28 Mar 2021 22:02:34 +0000 (17:02 -0500)]
deps: remove unused rustc_attr crate AP crate
Caleb Cartwright [Wed, 17 Mar 2021 22:09:41 +0000 (17:09 -0500)]
chore: bump toolchain
Caleb Cartwright [Wed, 17 Mar 2021 00:48:38 +0000 (19:48 -0500)]
deps: bump rustc-ap crates to v711
Caleb Cartwright [Tue, 16 Mar 2021 01:07:44 +0000 (20:07 -0500)]
deps: apply rustc module loading changes
Caleb Cartwright [Tue, 16 Mar 2021 01:04:09 +0000 (20:04 -0500)]
deps: bump rustc-ap crates to v710
Caleb Cartwright [Sun, 14 Mar 2021 18:44:02 +0000 (13:44 -0500)]
chore: apply AST HasAttrs->AstLike changes
Caleb Cartwright [Sun, 14 Mar 2021 18:43:33 +0000 (13:43 -0500)]
deps: bump rustc-ap crates to v709
Caleb Cartwright [Sun, 28 Mar 2021 21:25:30 +0000 (16:25 -0500)]
refactor: apply rustc mod parsing changes
Caleb Cartwright [Sun, 14 Mar 2021 18:16:52 +0000 (13:16 -0500)]
chore: apply pattern parsing changes
Caleb Cartwright [Sun, 14 Mar 2021 18:15:48 +0000 (13:15 -0500)]
chore: add span creation util function
Caleb Cartwright [Sun, 14 Mar 2021 18:10:19 +0000 (13:10 -0500)]
deps: bump rustc-ap crates to v708
Yuki Okushi [Thu, 18 Mar 2021 09:07:54 +0000 (18:07 +0900)]
Fix a `legacy_derive_helpers` warning
Joshua Nelson [Wed, 17 Feb 2021 04:33:20 +0000 (23:33 -0500)]
Fix some clippy warnings
This commit can be replicated with
`cargo clippy --fix -Z unstable-options && cargo +nightly-2021-02-10 fmt`.
David Bar-On [Fri, 8 Jan 2021 13:56:05 +0000 (15:56 +0200)]
Add the use of rewrite_assign_rhs_with_comments to 1.x
David Bar-On [Tue, 16 Feb 2021 14:35:47 +0000 (16:35 +0200)]
Fix for issue 4603 about extra macro body indentation (third version)
Joshua Nelson [Wed, 17 Feb 2021 04:26:01 +0000 (23:26 -0500)]
Fix warnings
- Fix nightly warning about `format!`
- Remove unused functions and fields
Thomas Eizinger [Thu, 11 Feb 2021 06:54:52 +0000 (17:54 +1100)]
Bump rustc-ap-* crates to version 706
Caleb Cartwright [Sun, 7 Feb 2021 17:47:20 +0000 (11:47 -0600)]
meta: bump to v1.4.36
Caleb Cartwright [Sat, 6 Feb 2021 21:13:14 +0000 (15:13 -0600)]
deps: apply rustc-ap v705 changes to itemkind variants
Caleb Cartwright [Sat, 6 Feb 2021 21:25:23 +0000 (15:25 -0600)]
chore: bump rust toolchain version
Caleb Cartwright [Sat, 6 Feb 2021 21:12:38 +0000 (15:12 -0600)]
deps: bump rustc-ap crates to v705
Caleb Cartwright [Thu, 4 Feb 2021 02:27:17 +0000 (20:27 -0600)]
meta: bump version to v1.4.35
Caleb Cartwright [Wed, 3 Feb 2021 04:01:34 +0000 (22:01 -0600)]
chore: bump toolchain file
Caleb Cartwright [Wed, 3 Feb 2021 03:56:22 +0000 (21:56 -0600)]
deps: bump rustc-ap to v702
Caleb Cartwright [Sun, 31 Jan 2021 22:08:00 +0000 (16:08 -0600)]
deps: bump rustc-ap crates to v701.0.0
Dave Rolsky [Wed, 3 Feb 2021 04:54:12 +0000 (23:54 -0500)]
Add arch name to archive files created in the upload workflow (#4679)
* Add arch name to archive files created in the upload workflow
* Fix arch names in matrix.build key to include arch name as well
Caleb Cartwright [Fri, 29 Jan 2021 03:21:26 +0000 (21:21 -0600)]
meta: bump to v1.4.34
Caleb Cartwright [Fri, 29 Jan 2021 01:14:44 +0000 (19:14 -0600)]
fix: don't insert trailing comma on struct lit rest in mac def
Caleb Cartwright [Fri, 29 Jan 2021 01:13:48 +0000 (19:13 -0600)]
tests: add case for issue 4675
Caleb Cartwright [Thu, 28 Jan 2021 02:21:07 +0000 (20:21 -0600)]
meta: bump to v1.4.33
Caleb Cartwright [Thu, 28 Jan 2021 01:46:32 +0000 (19:46 -0600)]
chore: backport some empty block check fixes
Caleb Cartwright [Thu, 7 Jan 2021 02:25:11 +0000 (20:25 -0600)]
refactor: cleanup block check for statements
vallentin [Sun, 17 Jan 2021 17:33:47 +0000 (18:33 +0100)]
Fixed semicolon getting moved into comment (fixes #4646)
vallentin [Sun, 17 Jan 2021 17:56:04 +0000 (18:56 +0100)]
Added 4646 test case
Michael Morgan [Tue, 12 Jan 2021 19:29:11 +0000 (14:29 -0500)]
Add imports_granularity="Item".
This option splits all imports into their own `use` statement.
Sean Klein [Tue, 19 Jan 2021 18:40:58 +0000 (13:40 -0500)]
fix: Avoid incorrect global 'cfg_if' Symbol interning
Fixes #4656
Caleb Cartwright [Wed, 27 Jan 2021 04:41:04 +0000 (22:41 -0600)]
chore: update Changelog with const generic backports
Ayaz Hafiz [Tue, 7 Jul 2020 14:31:09 +0000 (07:31 -0700)]
Include const generic type bounds in their spans
Closes #4310
topecongiro [Tue, 30 Jun 2020 09:19:13 +0000 (18:19 +0900)]
Do not duplicate const keyword on parameters
Seiichi Uchida [Wed, 27 May 2020 03:31:14 +0000 (12:31 +0900)]
Use the span after generics and where clause (#4208)
hafiz [Sun, 31 May 2020 08:36:08 +0000 (03:36 -0500)]
Include constness in impl blocks (#4215)
Closes #4084
Geoffry Song [Wed, 13 Jan 2021 01:30:26 +0000 (17:30 -0800)]
Tweak imports_granularity documentation
Geoffry Song [Sun, 10 Jan 2021 05:15:03 +0000 (21:15 -0800)]
Disable deprecated_option_merge_imports tests on non-nightly
Geoffry Song [Wed, 16 Dec 2020 01:19:54 +0000 (17:19 -0800)]
Rename `merge_imports` to `imports_granularity` and add a `Module` option.
This renames the existing `true`/`false` options to `Crate`/`Never`, then adds a
new `Module` option which causes imports to be grouped together by their
originating module.
Caleb Cartwright [Sat, 16 Jan 2021 02:54:48 +0000 (20:54 -0600)]
meta: bump version v1.4.32
Caleb Cartwright [Sat, 16 Jan 2021 02:54:15 +0000 (20:54 -0600)]
meta: update license years
Caleb Cartwright [Tue, 12 Jan 2021 23:40:53 +0000 (17:40 -0600)]
refactor: remove unneeded clone
Caleb Cartwright [Tue, 12 Jan 2021 23:39:03 +0000 (17:39 -0600)]
fix: indentation issue on generic bounds
Caleb Cartwright [Sat, 9 Jan 2021 18:45:43 +0000 (12:45 -0600)]
meta: bump to v1.4.31
Caleb Cartwright [Sat, 9 Jan 2021 18:45:08 +0000 (12:45 -0600)]
ci: add mingw to path for asset upload job