about summary refs log tree commit diff
path: root/src/libsyntax/std_inject.rs
AgeCommit message (Collapse)AuthorLines
2019-07-27Move standard library injection into libsyntax_extVadim Petrochenkov-112/+0
2019-07-19libsyntax: Remove `Mark` into `ExpnId`Vadim Petrochenkov-2/+2
2019-07-11hygiene: Introduce a helper method for creating new expansionsVadim Petrochenkov-15/+7
Creating a fresh expansion and immediately generating a span from it is the most common scenario. Also avoid allocating `allow_internal_unstable` lists for derive markers repeatedly. And rename `ExpnInfo::with_unstable` to `ExpnInfo::allow_unstable`, seems to be a better fitting name.
2019-07-11hygiene: Reuse `MacroKind` in `ExpnKind`Vadim Petrochenkov-2/+3
Orthogonality and reuse are good.
2019-07-11Rename some things in `syntax_pos/hygiene`Vadim Petrochenkov-2/+2
More consistent with other naming: ExpnFormat -> ExpnKind ExpnKind::name -> ExpnKind::descr DesugaringKind::name -> DesugaringKind::descr Shorter, no tautology: CompilerDesugaring -> Desugaring CompilerDesugaringKind -> DesugaringKind
2019-06-18syntax: Introduce `default`/`with_unstable` constructors for `ExpnInfo`Vadim Petrochenkov-9/+3
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-1/+1
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-4/+2
Most involving `Symbol::intern` on string literals.
2019-05-22Eliminate unnecessary `Ident::with_empty_ctxt`sVadim Petrochenkov-1/+1
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-3/+3
2019-05-21Move `edition` outside the hygiene lock and avoid accessing itJohn Kåre Alsaker-4/+4
2019-05-20Remove `Symbol::gensym()`.Nicholas Nethercote-4/+6
2019-05-20Eliminate `Symbol::gensymed`.Nicholas Nethercote-9/+4
2019-05-17Avoid unnecessary interning in `Ident::from_str()` calls.Nicholas Nethercote-3/+5
A lot of these static symbols are pre-interned.
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-0/+3
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-4/+4
2019-02-11Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocsOliver Scherer-2/+2
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-1/+3
2019-02-07libsyntax => 2018Taiki Endo-8/+9
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-04syntax: Rename some keywordsVadim Petrochenkov-1/+1
`CrateRoot` -> `PathRoot`, `::` doesn't necessarily mean crate root now `SelfValue` -> `SelfLower`, `SelfType` -> `SelfUpper`, both `self` and `Self` can be used in type and value namespaces now
2018-08-19mv codemap source_mapDonato Sciarra-1/+1
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1/+1
2018-08-14syntax: gensym the injected std/core extern crates in the Rust 2018 edition.Eduard-Mihai Burtescu-7/+30
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+1
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-8/+6
2018-05-17Add edition to expansion infoVadim Petrochenkov-1/+2
2018-04-16Reorder injection of std to get better compilation errorRussell Cohen-1/+2
2018-04-07Inject the `compiler_builtins` crate whenever the `core` crate is injectedOliver Schneider-15/+26
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-1/+1
2018-04-06Remove more duplicated spansVadim Petrochenkov-2/+2
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-1/+1
2018-03-17AST: Keep distinction between `path` and `::path` in imports and visibilitiesVadim Petrochenkov-1/+1
Add the root segment for name resolution purposes only
2018-03-17AST/HIR: Clarify what the optional name in extern crate items meanVadim Petrochenkov-4/+2
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-2/+2
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-3/+3
2017-12-12Improve pretty printing `$crate::` paths.Jeffrey Seyfried-11/+15
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-6/+10
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-08-30Make fields of `Span` privateVadim Petrochenkov-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-3/+3
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+1
2017-07-28syntax: Add `tokens: Option<TokenStream>` to ItemAlex Crichton-0/+2
This commit adds a new field to the `Item` AST node in libsyntax to optionally contain the original token stream that the item itself was parsed from. This is currently `None` everywhere but is intended for use later with procedural macros.
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-1/+1
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-2/+2
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-13/+8
2017-03-19Auto merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrcbors-5/+3
`TokenStream`-based attributes, paths in attribute and derive macro invocations This PR - refactors `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`. - supports macro invocation paths for attribute procedural macros. - e.g. `#[::foo::attr_macro] struct S;`, `#[cfg_attr(all(), foo::attr_macro)] struct S;` - supports macro invocation paths for derive procedural macros. - e.g. `#[derive(foo::Bar, super::Baz)] struct S;` - supports arbitrary tokens as arguments to attribute procedural macros. - e.g. `#[foo::attr_macro arbitrary + tokens] struct S;` - supports using arbitrary tokens in "inert attributes" with derive procedural macros. - e.g. `#[derive(Foo)] struct S(#[inert arbitrary + tokens] i32);` where `#[proc_macro_derive(Foo, attributes(inert))]` r? @nrc
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-5/+3
2017-03-10Give spans to individual path segments in ASTVadim Petrochenkov-1/+1
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-1/+2
2016-12-22Refactor how global paths are represented (for both ast and hir).Jeffrey Seyfried-2/+1