about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2019-09-26Rename `Lit.node` to `Lit.kind`varkor-1/+1
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-2/+2
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-2/+2
For both `ast::Expr` and `hir::Expr`.
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-1/+1
2019-09-08Rollup merge of #64066 - petrochenkov:softstab, r=matthewjasperMazdak Farrokhzad-1/+2
Support "soft" feature-gating using a lint Use it for feature-gating `#[bench]`. Closes https://github.com/rust-lang/rust/issues/63798.
2019-09-07Support "soft" feature-gating using a lintVadim Petrochenkov-1/+2
Use it for feature-gating `#[bench]`
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: librustcAlexander Regueiro-41/+37
2019-09-07Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkovMazdak Farrokhzad-0/+8
Use hygiene for AST passes AST passes are now able to have resolve consider their expansions as if they were opaque macros defined either in some module in the current crate, or a fake empty module with `#[no_implicit_prelude]`. * Add an ExpnKind for AST passes. * Remove gensyms in AST passes. * Remove gensyms in`#[test]`, `#[bench]` and `#[test_case]`. * Allow opaque macros to define tests. * Move tests for unit tests to their own directory. * Remove `Ident::{gensym, is_gensymed}` - `Ident::gensym_if_underscore` still exists. cc #60869, #61019 r? @petrochenkov
2019-09-05Add an ExpnKind for AST passesMatthew Jasper-0/+8
2019-09-05Rollup merge of #64141 - nnethercote:minimize-LocalInternedString, ↵Mazdak Farrokhzad-22/+1
r=petrochenkov Minimize uses of `LocalInternedString` `LocalInternedString` is described as "An alternative to `Symbol` and `InternedString`, useful when the chars within the symbol need to be accessed. It is best used for temporary values." This PR makes the code match that comment, by removing all non-local uses of `LocalInternedString`. This allows the removal of a number of operations on `LocalInternedString` and a couple of uses of `unsafe`.
2019-09-04Remove hashing impls for `LocalInternedString`.Nicholas Nethercote-22/+1
2019-09-02Auto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obkbors-12/+8
Make Allocation::bytes private Fixes #62931. Direct immutable access to the bytes is still possible but redirected through the new method `raw_bytes_with_undef_and_ptr`, similar to `get_bytes_with_undef_and_ptr` but without requiring an interpretation context and not doing *any* relocation or bounds checks. The `size` of the allocation is stored separately which makes access as `Size` and `usize` more ergonomic. cc: @RalfJung
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-2/+2
2019-08-23Remove default macro transparenciesVadim Petrochenkov-1/+0
All transparancies are passed explicitly now. Also remove `#[rustc_macro_transparency]` annotations from built-in macros, they are no longer used. `#[rustc_macro_transparency]` only makes sense for declarative macros now.
2019-08-17Derive HashStable for AllocationAndreas Molzer-18/+8
Requires a manual implementation for Relocations since dereferencing to SortedMap is not always implemented but that one is far more trivial. Added fields could otherwise be silently forgotten since private fields make destructing outside the module possible only with `..` pattern which would then also be applicable to newly added public fields.
2019-08-17Store allocation size, make bytes, undef_mask privateAndreas Molzer-1/+7
Direct access to the bytes was previously a problem (#62931) where components would read their contents without properly checking relocations and/or definedness. Making bytes private instead of purely renaming them also helps in allowing amendments to their allocation scheme (such as eliding allocation for undef of constant regions).
2019-08-15hygiene: `ExpnInfo` -> `ExpnData`Vadim Petrochenkov-2/+2
For naming consistency with everything else in this area
2019-08-15hygiene: Merge `ExpnInfo` and `InternalExpnData`Vadim Petrochenkov-1/+2
2019-08-15syntax_pos: `NO_EXPANSION`/`SyntaxContext::empty()` -> `SyntaxContext::root()`Vadim Petrochenkov-1/+1
For consistency with `ExpnId::root`. Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-4/+0
2019-08-14Merge Variant and Variant_Caio-1/+1
2019-08-05add unknown tokenAleksey Kladov-1/+2
2019-08-02Replace "existential" by "opaque"varkor-1/+1
2019-07-19hygiene: Tweak naming some moreVadim Petrochenkov-4/+4
2019-07-19libsyntax: Remove `Mark` into `ExpnId`Vadim Petrochenkov-1/+1
2019-07-11hygiene: Make sure each `Mark` has an associated expansion infoVadim Petrochenkov-0/+1
The root expansion was missing one. Expansions created for "derive containers" (see one of the next commits for the description) also didn't get expansion info.
2019-07-11hygiene: Reuse `MacroKind` in `ExpnKind`Vadim Petrochenkov-2/+1
Orthogonality and reuse are good.
2019-07-11Rename some things in `syntax_pos/hygiene`Vadim Petrochenkov-4/+4
More consistent with other naming: ExpnFormat -> ExpnKind ExpnKind::name -> ExpnKind::descr DesugaringKind::name -> DesugaringKind::descr Shorter, no tautology: CompilerDesugaring -> Desugaring CompilerDesugaringKind -> DesugaringKind
2019-07-11Remove `MacroKind::ProcMacroStub`Vadim Petrochenkov-1/+0
It's internal to resolve and always results in `Res::Err` outside of resolve. Instead put `DefKind::Fn`s themselves into the macro namespace, it's ok. Proc macro stubs are items placed into macro namespase for functions that define proc macros. https://github.com/rust-lang/rust/pull/52383 The rustdoc test is changed because the old test didn't actually reproduce the ICE it was supposed to reproduce.
2019-07-06Enforce 'cond: bool' in while-expr + improve reachability diags.Mazdak Farrokhzad-1/+1
2019-06-21Further reduce the likelyhood of hash collisionsOliver Scherer-0/+1
2019-06-19Make `Allocation` stable hash robustOliver Scherer-5/+9
2019-06-19Rollup merge of #61941 - cramertj:no-more-yield-errors, r=centrilMazdak Farrokhzad-5/+5
Preserve generator and yield source for error messages Previously, error messages after HIR lowering all referred to generators and yield, regardless of whether the original source was a generator or an async/await body. This change tracks the kind of each generator and yield source in order to provide appropriately tailored error messages. Fixes #60615.
2019-06-18Preserve generator and yield source for error messagesTaylor Cramer-5/+5
Previously, error messages after HIR lowering all referred to generators and yield, regardless of whether the original source was a generator or an async/await body. This change tracks the kind of each generator and yield source in order to provide appropriately tailored error messages.
2019-06-18syntax: Move `default_transparency` into `ExpnInfo`Vadim Petrochenkov-1/+8
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-15/+21
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-15/+15
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-2/+2
2019-06-11Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-15/+11
2019-06-11rustc: deny(unused_lifetimes).Eduard-Mihai Burtescu-6/+6
2019-06-07syntax: Treat error literals in more principled wayVadim Petrochenkov-2/+2
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-2/+2
2019-06-06syntax: Remove duplicate span from `token::Lifetime`Vadim Petrochenkov-1/+1
2019-06-06syntax: Use `Token` in `TokenTree::Token`Vadim Petrochenkov-60/+64
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-1/+1
2019-06-06Always use token kinds through `token` module rather than `Token` typeVadim Petrochenkov-41/+41
2019-06-05Addressed points raised in review.Alexander Regueiro-1/+1
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-1/+1
2019-05-31Remove ty::BrFresh and new_boundYuki Okushi-1/+0