Nicholas Nethercote
05a0dfe8cd
Use AttrVec
in more places.
...
In some places we use `Vec<Attribute>` and some places we use
`ThinVec<Attribute>` (a.k.a. `AttrVec`). This results in various points
where we have to convert between `Vec` and `ThinVec`.
This commit changes the places that use `Vec<Attribute>` to use
`AttrVec`. A lot of this is mechanical and boring, but there are
some interesting parts:
- It adds a few new methods to `ThinVec`.
- It implements `MapInPlace` for `ThinVec`, and introduces a macro to
avoid the repetition of this trait for `Vec`, `SmallVec`, and
`ThinVec`.
Overall, it makes the code a little nicer, and has little effect on
performance. But it is a precursor to removing
`rustc_data_structures::thin_vec::ThinVec` and replacing it with
`thin_vec::ThinVec`, which is implemented more efficiently.
2022-08-22 07:35:33 +10: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
Caleb Cartwright
8211d64c71
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
2022-03-29 23:17:30 -05:00
Felix S. Klock II
74876ef4e9
Associate multiple with a crate too.
2022-03-03 18:45:25 -05:00
Eduard-Mihai Burtescu
5723946081
rustc_errors: take self
by value in DiagnosticBuilder::cancel
.
2022-02-23 06:08:06 +00:00
Caleb Cartwright
6db6bafc61
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree
2021-12-29 20:49:39 -06:00
Nicholas Nethercote
122e1c3802
Remove unnecessary sigils around Ident::as_str()
calls.
2021-12-15 17:32:42 +11:00
Nicholas Nethercote
3bb5f81d8d
Remove unnecessary sigils around Symbol::as_str()
calls.
2021-12-15 17:32:14 +11:00
Caleb Cartwright
f99e3582bd
Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync
2021-11-07 20:37:34 -06:00
Fabian Wolff
e014277b07
Ignore automatically derived impls of Clone
and Debug
in dead code analysis
2021-09-09 19:49:07 +02:00
Caleb Cartwright
2608f2c63b
fix(rustfmt): load nested out-of-line mods correctly
2021-06-17 22:35:19 -05:00
Caleb Cartwright
f87414729f
fix: backport changes for latest rustc api comaptibility
2021-05-02 10:37:43 -05:00
Caleb Cartwright
4c617e8fb3
deps: apply rustc module loading changes
2021-04-02 23:21:06 -05:00
Caleb Cartwright
a1dc57ace1
chore: apply AST HasAttrs->AstLike changes
2021-04-02 23:21:06 -05:00
Caleb Cartwright
612e8d5b9b
refactor: apply rustc mod parsing changes
2021-04-02 23:21:06 -05:00
Yuki Okushi
ca4e9f47b9
Fix a legacy_derive_helpers
warning
2021-03-18 23:34:32 -05:00
Sean Klein
5e14f760c5
fix: Avoid incorrect global 'cfg_if' Symbol interning
...
Fixes #4656
2021-01-27 19:26:58 -06:00
Caleb Cartwright
62dc7c5c6b
fix: inner attribute formatting
2020-09-04 19:01:18 -05:00
mahkoh
89b7f5f382
Fix module resolution in inner modules with paths ( #4194 )
2020-09-04 19:01:18 -05:00
Caleb Cartwright
637ddfb6da
deps: bump rustc-ap to v673
2020-09-04 19:01:18 -05:00
Caleb Cartwright
ce1a3efff0
fix: backport fix for submod parser errors
2020-06-11 21:49:40 -05:00
Caleb Cartwright
dead3a807d
fix: backport mod resolution error handling
2020-06-11 21:11:18 -05:00
topecongiro
08776ef3b4
Support module-level rustfmt::skip in sub-modules
2020-06-08 10:42:43 +09:00
Seiichi Uchida
577ef8136f
Update rustc-ap-* crates to 659.0.0 for rustfmt-1.4.15 ( #4184 )
2020-05-19 17:31:28 +09:00
Caleb Cartwright
b173b42354
refactor: rename libsyntax --> rustc_ast
2020-03-27 22:29:12 -05:00
Caleb Cartwright
bea7209d0a
chore: fix src formatting
2020-03-27 21:53:40 -05:00
Caleb Cartwright
9b0ed57af6
refactor: parse & mod resolver for rustc-ap v650
2020-03-27 21:33:34 -05:00
Caleb Cartwright
bd5dff4012
refactor: backport syntux mod
2020-03-26 21:25:34 -05:00
Caleb Cartwright
9699c96cf1
deps: bump to rustc v647
2020-03-26 17:20:24 -05:00
Caleb Cartwright
7a76ec062d
deps: bump to rustc v644
2020-03-26 15:26:58 -05:00
Caleb Cartwright
760bb29feb
chore: fix compile warnings
2020-02-08 22:54:37 -06:00
Caleb Cartwright
c60416ed21
deps: update rustc-ap to v642.0.0
2020-02-08 22:21:37 -06:00
Seiichi Uchida
383306e5fe
Update rustc-ap-* crates to 606.0.0 ( #3835 )
2019-10-05 23:40:24 +09:00
Seiichi Uchida
5baba86fe5
Update rustc-ap-* crates to 581.0.0 ( #3783 )
2019-09-06 22:41:03 +09:00
Caleb Cartwright
ad5d9fba9b
fix formatting mods inside cfg_if macro ( #3763 )
2019-09-02 18:36:51 +09:00
Seiichi Uchida
0e3cf08ff1
Release 1.3.0 ( #3611 )
2019-06-09 21:28:57 +09:00
Seiichi Uchida
47a11cd516
Format modules defined in cfg_attr ( #3604 )
2019-06-09 09:20:39 +09:00
Seiichi Uchida
e71bffb008
Format modules defined inside cfg_if macro calls ( #3600 )
2019-06-08 18:47:18 +09:00
Stéphane Campinas
87565c42ce
Merge pull request #3607 from topecongiro/issue-3493
...
Ignore sub-modules when skip-children is used
2019-06-08 09:50:12 +02:00
topecongiro
dae63e98ce
Ignore sub-modules when skip-children is used
2019-06-07 14:55:41 +09:00
Seiichi Uchida
2244f326e6
Cargo update ( #3559 )
...
Update `rustc-ap-*` crates to 486.0.0.
2019-06-03 23:57:02 +09:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint
2019-05-09 20:37:51 +02:00
topecongiro
92f57211c1
Support path-clarity submodule
2019-03-17 12:33:13 +09:00
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +09:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
cad97
fc1909d311
Reformat
2018-08-23 17:14:19 -04:00
cad97
04d804c365
Rename CodeMap/FileMap to SourceMap/SourceFile
...
#2946
2018-08-23 17:10:46 -04:00
Seiichi Uchida
a201d856d1
Add comment
2018-08-06 22:34:58 +09:00
Seiichi Uchida
4ad1c66001
Use custom path value if one exists when searching modules
2018-08-06 22:28:05 +09:00
Nick Cameron
843c12601a
Use our own FileName
struct rather than exporting libsyntax's
2018-05-21 12:08:39 +12:00