about summary refs log tree commit diff
path: root/src/libsyntax_pos/hygiene.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-19Reintroduce special pretty-printing for `$crate` when it's necessary for ↵Vadim Petrochenkov-2/+24
proc macros
2018-12-19Remove `eliminate_crate_var` and special pretty-printing for `$crate`Vadim Petrochenkov-16/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-7/+7
2018-12-04syntax: Remove `#[non_exhaustive]` from `Edition`Vadim Petrochenkov-2/+2
`Edition` is not a public API, we want users to break when a new edition is added
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-09-08resolve: Introduce "may appear after" abstraction for macro path resolutionsVadim Petrochenkov-0/+5
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-5/+4
2018-08-24Revert "hygiene: Make sure expansion info is set at most once for a given ↵Vadim Petrochenkov-8/+1
`Mark`" This reverts commit b15785b67133b5017f141d1fda1dd3dcf331b4b4.
2018-08-19Parse try blocks with the try keyword instead of do catch placeholderScott McMurray-1/+1
2018-08-19Rename `Catch` variants to `TryBlock`Scott McMurray-2/+2
(Not `Try` since `QuestionMark` is using that.)
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-2/+0
2018-07-18Do not use desugared ident when suggesting adding a typeEsteban Küber-0/+2
2018-07-08Remove fallback to parent modules from lexical resolutionVadim Petrochenkov-24/+22
2018-07-08hygiene: Decouple transparencies from expansion IDsVadim Petrochenkov-32/+44
2018-07-08libsyntax_pos: Tweak some visibilitiesVadim Petrochenkov-8/+16
2018-06-30Address commentsVadim Petrochenkov-1/+0
2018-06-30hygiene: Implement transparent marksVadim Petrochenkov-22/+75
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-22/+1
Remove emulation of hygiene with gensyms
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+3
2018-06-25Fix typoBerkus Karchebnyy-1/+1
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-31/+23
2018-06-23hygiene: Make sure transparency of `Mark::root()` is an implementation ↵Vadim Petrochenkov-0/+2
detail and cannot be inspected outside of `hygiene.rs`
2018-06-23hygiene: Rename `MarkKind` to `Transparency`Vadim Petrochenkov-19/+51
Move `is_builtin` for `Mark` to a separate flag
2018-06-23hygiene: Make sure expansion info is set at most once for a given `Mark`Vadim Petrochenkov-1/+8
2018-06-23hygiene: Give `Debug` impls to hygiene structuresVadim Petrochenkov-2/+4
2018-06-21async await desugaring and testsTaylor Cramer-0/+2
2018-06-07Add existential type definitonsOliver Schneider-0/+5
2018-05-17Add edition to expansion infoVadim Petrochenkov-0/+13
2018-05-14Hyperlink DOI against preferred resolverKatrin Leinweber-1/+1
https://www.doi.org/doi_handbook/3_Resolution.html#3.8
2018-04-26Fix review nitsbobtwinkles-5/+5
2018-04-23Implement a least upper bound for marks.bobtwinkles-0/+27
This is useful when trying to compute when something is lexically before something else, but they aren't necessarily in the same SyntaxContext
2018-04-23Add documentation for SyntaxContext::remove_markbobtwinkles-0/+16
2018-04-16Remove unwanted auto-linking and updateGuillaume Gomez-2/+2
2018-04-10Add ok-wrapping to catch blocks, per RFCScott McMurray-0/+2
2018-04-06Use `Span` instead of `SyntaxContext` in `Ident`Vadim Petrochenkov-3/+3
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-2/+0
Closes #22181, #27779
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-7/+4
2018-01-12Auto merge of #46551 - jseyfried:improve_legacy_modern_macro_interaction, r=nrcbors-0/+39
macros: improve 1.0/2.0 interaction This PR supports using unhygienic macros from hygienic macros without breaking the latter's hygiene. ```rust // crate A: #[macro_export] macro_rules! m1 { () => { f(); // unhygienic: this macro needs `f` in its environment fn g() {} // (1) unhygienic: `g` is usable outside the macro definition } } // crate B: #![feature(decl_macro)] extern crate A; use A::m1; macro m2() { fn f() {} // (2) m1!(); // After this PR, `f()` in the expansion resolves to (2), not (3) g(); // After this PR, this resolves to `fn g() {}` from the above expansion. // Today, it is a resolution error. } fn test() { fn f() {} // (3) m2!(); // Today, `m2!()` can see (3) even though it should be hygienic. fn g() {} // Today, this conflicts with `fn g() {}` from the expansion, even though it should be hygienic. } ``` Once this PR lands, you can make an existing unhygienic macro hygienic by wrapping it in a hygienic macro. There is an [example](https://github.com/rust-lang/rust/pull/46551/commits/b766fa887dc0e4b923a38751fe4d570e35a75710) of this in the tests. r? @nrc
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-4/+7
2017-12-14incr.comp.: Speed up span hashing by caching expansion context hashes.Michael Woerister-0/+9
2017-12-13Improve interaction between macros 2.0 and `macro_rules!`.Jeffrey Seyfried-0/+39
2017-12-12Refactor `MarkData` field `modern: bool` to `kind: MarkKind`.Jeffrey Seyfried-14/+28
2017-12-01incr.comp.: Properly hash and encode macro expansion information.Michael Woerister-4/+29
2017-09-23Compress "small" spans to 32 bits and intern "large" spansVadim Petrochenkov-1/+1
2017-08-18Auto merge of #43832 - huntiep:compiler-desugaring-enum, r=nikomatsakisbors-3/+23
Implement CompilerDesugaringKind enum This is the first step outlined in #35946. I think that the variants of `CompilerDesugaringKind` should be changed, I didn't know what the official names for `...` and `<-` are. I'm not to sure how tests for the compiler work, but I would imagine that tests should be added such that `Symbol::intern(s) == CompilerDesugaringKind::from(s).as_symbol()` for valid `s`.
2017-08-16Use direct references to CompilerDesugaringKindHunter Praska-12/+0
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-08-12Implement CompilerDesugaringKind enumHunter Praska-3/+35
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+3