Commit Graph

5222 Commits

Author SHA1 Message Date
Caleb Cartwright
7b73b60fac chore: prep v1.5.0 release 2022-06-12 21:41:15 -05:00
David Bar-On
7d34cfaf2c Dedup imports_granularity = "Item" (#4737)
* Fix for issue 4725 - dedup Item imports_granularity (2nd version)

* Use unique() instead of unique_by()
2022-06-11 19:57:47 -05:00
Urgau
5fa2727dde Remove useless conditional compilation 2022-06-09 22:24:27 -05:00
Caleb Cartwright
75786fb0b7
Merge pull request #5374 from calebcartwright/subtree-sync-2022-06-07
Subtree sync
2022-06-08 19:58:15 -05:00
Caleb Cartwright
aedb396063 chore: bump toolchain 2022-06-07 22:14:08 -05:00
Caleb Cartwright
1ac2ac0db6 Merge remote-tracking branch 'upstream/master' into subtree-sync-2022-06-07 2022-06-07 22:06:28 -05:00
Caleb Cartwright
64f1f57a48 fix: handle inner ignore attribute on stdin 2022-06-04 15:12:29 -05:00
Caleb Cartwright
79515f17ed feat: remove license_template_path config option 2022-05-30 08:56:09 -05:00
Caleb Cartwright
5e4296767f refactor: remove code for bad issue (e.g. todo/fixme) reporting 2022-05-30 08:56:09 -05:00
Caleb Cartwright
825561deb8 feat: remove report_fixme option 2022-05-30 08:56:09 -05:00
Caleb Cartwright
4c8db85939 feat: remove report_todo option 2022-05-30 08:56:09 -05:00
Caleb Cartwright
3e38399ed8 docs: clarify imports_granularity behavior with comments 2022-05-26 22:27:20 -05:00
Yacin Tmimi
73be264f9f Rephrase changelog entries to give more context 2022-05-26 21:51:07 -05:00
Yacin Tmimi
a5cfd4d145 Updated Unreleased CHANGELOG entries
from revision  v1.4.38..2d9bc460
2022-05-26 21:51:07 -05:00
Alexander Pozdneev
37b48ca4b2 Update Configurations.md
Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
2022-05-23 09:52:20 -04:00
Alexander Pozdneev
0b6659cf02 Update Configurations.md 2022-05-23 09:52:20 -04:00
Jacob Pratt
9b697d0b90 Merge crate and restricted visibilities 2022-05-21 17:02:55 -04:00
Jacob Pratt
0d27f70743 Remove feature: crate visibility modifier 2022-05-21 14:22:06 -04:00
Jacob Pratt
241a6f6930 Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
ydah
86940d2652 Fix typo
This PR is fixes typo "avaiable" to "available".
2022-05-20 10:39:10 +09:00
David Lattimore
95837832f4 import_granularity: Don't normalize imports with comments 2022-05-18 21:08:30 -05:00
klensy
b507c60e1c fix rustfmt 2022-05-18 20:43:16 +03:00
Yacin Tmimi
b08b2daeb6 Add test for issue 3937
Closes 3937

It's unclear which change fixed the `format_code_in_doc_comments=true`
issue brought up in this issue, however I'm unable to reproduce the
error on the current master.

The added test cases should serve to prevent a regression.
2022-05-17 17:17:07 -05:00
Koichi ITO
8a4c05865b Use the traits added to the Rust 2021 Edition prelude
Follow up https://github.com/rust-lang/rust/pull/96861.

This PR uses the traits added to the Rust 2021 Edition prelude.

> The `TryInto`, `TryFrom` and `FromIterator` traits are now part of the prelude.

https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html
2022-05-14 10:41:46 -05:00
Vadim Petrochenkov
f77fd90aff ast: Introduce some traits to get AST node properties generically
And use them to avoid constructing some artificial `Nonterminal` tokens during expansion
2022-05-11 12:43:27 +03:00
Yuki Okushi
8fcf113743 Rollup merge of #96543 - nnethercote:rm-make_token_stream-hacks, r=Aaron1011
Remove hacks in `make_token_stream`.

`make_tokenstream` has three commented hacks, and a comment at the top
referring to #67062. These hacks have no observable effect, at least as judged
by running the test suite. The hacks were added in #82608, with an explanation
[here](https://github.com/rust-lang/rust/pull/82608#issuecomment-812877329). It
appears that one of the following is true: (a) they never did anything useful,
(b) they do something useful but we have no test coverage for them, or (c)
something has changed in the meantime that means they are no longer necessary.

This commit removes the hacks and the comments, in the hope that (b) is not
true.

r? `@Aaron1011`
2022-05-11 13:16:30 +09:00
Nicholas Nethercote
77f096453c Remove some unnecessary invisible delimiter checks.
These seem to have no useful effect... they don't seem useful from a
code inspection point of view, and they affect anything in the test
suite.
2022-05-11 10:14:49 +10:00
Josh Triplett
17003ce66b In the docs for hex_literal_case, show the default as a possible value 2022-05-09 19:45:02 -05:00
PSeitz
84fd4cdd02 Update CHANGELOG.md 2022-05-09 11:25:17 -04:00
Pascal Seitz
c65ba14d69 Fixes #5260
Fixes #5260 by checking if it is part of a type '::'
2022-05-08 13:22:35 -05:00
Yacin Tmimi
3cc1f5ed5b Add tests for issue 4573
It's unclear which PR resolved this issue, however the behavior of
adding inline comments to the next line can't be reproduced.

These test cases should serve to prevent a regression.
2022-05-08 12:55:43 -05:00
cuishuang
c03e1842f6 fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-05-07 11:10:59 -05:00
Scott McMurray
050978ba43 Fix the rustfmt build 2022-04-30 17:40:29 -07:00
David Tolnay
b26c86b51a Update GitHub Actions actions/checkout@v2 to v3
The v2 implementation uses Node 12, which is end-of-life on April 30, 2022.
See https://nodejs.org/en/about/releases/. Update to v3, which is based on
Node 16 whose support lasts until April 30, 2024.
2022-04-30 18:55:10 -04:00
Vadim Petrochenkov
70067e31ed rustc_ast: Harmonize delimiter naming with proc_macro::Delimiter 2022-04-28 10:04:29 +03:00
Nicholas Nethercote
f300792f9a Make explicit an unreachable NoDelim case in rustfmt. 2022-04-27 10:35:33 +10:00
Nicholas Nethercote
e08df2dd6b Avoid producing NoDelim values in MacArgs::delim(). 2022-04-27 08:15:12 +10:00
hkalbasi
a37d3ab0e1 Memoize format_expr 2022-04-17 09:32:43 -05:00
Tom Milligan
acdab00ecc [review] check interaction with import grouping 2022-04-17 09:28:48 -05:00
Tom Milligan
9b1b3d6955 [review] rename internal function 2022-04-17 09:28:48 -05:00
Paul Gey
ba0351a146 Preserve attributes for imports_granularity=Item
Fixes #5030
2022-04-17 09:28:48 -05:00
Camille GILLOT
10954cfd4c Visit generics inside visit_fn. 2022-04-17 11:03:33 +02:00
Dylan DPC
a11c79b821 Rollup merge of #94461 - jhpratt:2024-edition, r=pnkfelix
Create (unstable) 2024 edition

[On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.

This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.

For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.

````@rustbot```` label +T-lang +S-waiting-on-review

Not sure on the relevant team, to be honest.
2022-04-15 20:50:43 +02:00
David Wood
0cf62ae103 errors: lazily load fallback fluent bundle
Loading the fallback bundle in compilation sessions that won't go on to
emit any errors unnecessarily degrades compile time performance, so
lazily create the Fluent bundle when it is first required.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-04-13 02:44:59 +01:00
Tom Milligan
4f3f87fb9a group_imports: test and document non-consecutive imports 2022-04-11 17:46:33 -05:00
Caleb Cartwright
2d9bc46010 Backport 4326
refactor: rename some private whitelist names
2022-04-07 17:30:50 -05:00
Expyron
91995b6142 Replace structopt dependency by clap 2022-04-07 17:24:03 -05:00
David Wood
b482bee00c session: opt for enabling directionality markers
Add an option for enabling and disabling Fluent's directionality
isolation markers in output. Disabled by default as these can render in
some terminals and applications.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-04-05 07:01:03 +01:00
David Wood
f8ad4b5cf8 errors: implement sysroot/testing bundle loading
Extend loading of Fluent bundles so that bundles can be loaded from the
sysroot based on the language requested by the user, or using a nightly
flag.

Sysroot bundles are loaded from `$sysroot/share/locale/$locale/*.ftl`.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-04-05 07:01:02 +01:00
David Wood
6eea2a88c1 errors: implement fallback diagnostic translation
This commit updates the signatures of all diagnostic functions to accept
types that can be converted into a `DiagnosticMessage`. This enables
existing diagnostic calls to continue to work as before and Fluent
identifiers to be provided. The `SessionDiagnostic` derive just
generates normal diagnostic calls, so these APIs had to be modified to
accept Fluent identifiers.

In addition, loading of the "fallback" Fluent bundle, which contains the
built-in English messages, has been implemented.

Each diagnostic now has "arguments" which correspond to variables in the
Fluent messages (necessary to render a Fluent message) but no API for
adding arguments has been added yet. Therefore, diagnostics (that do not
require interpolation) can be converted to use Fluent identifiers and
will be output as before.
2022-04-05 07:01:02 +01:00