about summary refs log tree commit diff
path: root/src/librustc_ast
AgeCommit message (Collapse)AuthorLines
2020-03-25make bit_width return u64, consistently with other sizes in the compilerRalf Jung-3/+3
2020-03-23Split long derive lists into two derive attributes.Ana-Maria Mihalache-65/+10
2020-03-23Auto merge of #70296 - Centril:rollup-wvfmb3n, r=Centrilbors-1/+1
Rollup of 9 pull requests Successful merges: - #69251 (#[track_caller] in traits) - #69880 (miri engine: turn error sanity checks into assertions) - #70207 (Use getentropy(2) on macos) - #70227 (Only display definition when suggesting a typo) - #70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - #70248 (parser: simplify & remove unused field) - #70249 (handle ConstKind::Unresolved after monomorphizing) - #70269 (remove redundant closures (clippy::redundant_closure)) - #70270 (Clean up E0449 explanation) Failed merges: r? @ghost
2020-03-23Auto merge of #70204 - Centril:unshackled-lowering, r=Zoxcbors-0/+36
Liberate `rustc_ast_lowering` from `rustc` The whole point of this PR is the very last commit, in which we remove `rustc` as one of `rustc_ast_lowering`'s dependencies, thereby improving `./x.py` parallelism and working towards https://github.com/rust-lang/rust/issues/65031. Noteworthy: - From `rustc::arena` we move logic into `arena`, in particular `declare_arena!`. This is then used in `rustc_ast_lowering` so that lowering has its own separate arena. - Some linting code is unfortunately moved to `rustc_session::lint` cause its used both in `rustc_lint` and `rustc_ast_lowering`, and this is their common dependency. - `rustc_session::CrateDisambiguator` is moved into `rustc_ast` so that `rustc::hir::map::definitions` can be moved into `rustc_hir`, so that `rustc_ast_lowering` can stop referring to `rustc::hir`. r? @Zoxc
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-1/+1
2020-03-21move CrateDisambiguator -> rustc_astMazdak Farrokhzad-0/+36
2020-03-21ast: Compress `AttrId` from `usize` to `u32`Vadim Petrochenkov-18/+12
Also stop encoding/decoding it entirely
2020-03-20can_begin_literal_maybe_minus: `true` on `"-"? lit` NTs.Mazdak Farrokhzad-5/+14
2020-03-18Rollup merge of #69899 - ecstatic-morse:const-idx-methods, r=oli-obkMazdak Farrokhzad-1/+3
Make methods declared by `newtype_index` macro `const` Crates that use the macro to define an `Idx` type need to enable `#![feature(const_if_match, const_panic)]`.
2020-03-18de-fatalize outline module parsingMazdak Farrokhzad-1/+1
2020-03-17Add requisite feature gates for const assertDylan MacKenzie-0/+2
2020-03-17Rename `from_u32_const` -> `from_u32`Dylan MacKenzie-1/+1
2020-03-16ast/hir: `MacroDef::legacy` -> `MacroDef::macro_rules`Vadim Petrochenkov-2/+2
2020-03-15Rollup merge of #69988 - petrochenkov:nomacrodef, r=CentrilMazdak Farrokhzad-1/+1
rustc_metadata: Remove `rmeta::MacroDef` And other related cleanups. Follow-up to https://github.com/rust-lang/rust/pull/66364. r? @Centril
2020-03-15Rollup merge of #69589 - petrochenkov:maccall, r=CentrilMazdak Farrokhzad-46/+46
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc https://github.com/rust-lang/rust/pull/63586#discussion_r314232513 r? @eddyb
2020-03-14rustc_metadata: Remove `rmeta::MacroDef`Vadim Petrochenkov-1/+1
Use `ast::MacroDef` instead. Also remove `Session::imported_macro_spans`, external macros have spans now.
2020-03-12ast: `Mac`/`Macro` -> `MacCall`Vadim Petrochenkov-46/+46
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-3/+3
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-12Rollup merge of #69722 - estebank:negative-impl-span-ast, r=CentrilMazdak Farrokhzad-2/+2
Tweak output for invalid negative impl AST errors Use more accurate spans for negative `impl` errors. r? @Centril
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-2/+2
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-1/+1
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-2/+2
2020-03-10more reuse in block parsing & improve diagnostics.Mazdak Farrokhzad-0/+10
2020-03-09Address review commentsVadim Petrochenkov-5/+14
2020-03-09Use `Token::uninterpolate` in couple more places matching on `(Nt)Ident`Vadim Petrochenkov-35/+24
2020-03-09rustc_ast: Introduce `Token::uninterpolate`Vadim Petrochenkov-2/+18
2020-03-09rustc_ast: Introduce `Token::uninterpolated_span`Vadim Petrochenkov-0/+34
2020-03-06fix various typosMatthias Krüger-2/+2
2020-03-06Auto merge of #69586 - petrochenkov:unmerge, r=Centrilbors-57/+117
ast: Unmerge structures for associated items and foreign items Follow-up to https://github.com/rust-lang/rust/pull/69194. r? @Centril
2020-03-04Tweak output for invalid negative impl AST errorsEsteban Küber-2/+2
2020-03-03Auto merge of #69506 - Centril:stmt-semi-none, r=petrochenkovbors-7/+8
encode `;` stmt without expr as `StmtKind::Empty` Instead of encoding `;` statements without a an expression as a tuple in AST, encode it as `ast::StmtKind::Empty`. r? @petrochenkov
2020-03-01Rename `syntax` in librustc_ast/README.mdLeSeulArtichaut-1/+1
2020-03-01encode `;` stmt w/o expr as `StmtKind::Empty`Mazdak Farrokhzad-7/+8
2020-03-01ast: Implement `TryFrom<ItemKind>` for associated and foreign itemsVadim Petrochenkov-0/+29
2020-03-01ast: Unmerge structures for associated items and foreign itemsVadim Petrochenkov-57/+88
2020-02-29Make it build againVadim Petrochenkov-2/+2
2020-02-29Move directory `libsyntax` -> `librustc_ast`Vadim Petrochenkov-0/+8644