about summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2018-12-04adds DocTest filename variant, refactors doctest_offset out of source_map, ↵Matthew Russo-2/+10
fixes remaining test failures
2018-12-04updates all Filename variants to take a fingerprintMatthew Russo-24/+61
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-12-04Address review commentsVadim Petrochenkov-4/+4
2018-12-04syntax: Remove `#[non_exhaustive]` from `Edition`Vadim Petrochenkov-3/+2
`Edition` is not a public API, we want users to break when a new edition is added
2018-12-04syntax: Rename some keywordsVadim Petrochenkov-6/+6
`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-12-04syntax: `dyn` is a used keyword nowVadim Petrochenkov-5/+13
2018-12-02Delay gensym creation for "underscore items" until name resolutionVadim Petrochenkov-1/+5
Prohibit `static _` Fis unused import warnings for `use foo as _` Add more tests for `use foo as _`
2018-12-01Rollup merge of #56355 - Zoxc:inline-things, r=michaelwoeristerkennytm-0/+1
Add inline attributes and add unit to CommonTypes
2018-12-01Rollup merge of #56336 - nnethercote:clean-up-pp, r=nikomatsakiskennytm-0/+4
Clean up and streamline the pretty-printer Some minor improvements.
2018-11-29Add inline attributes and add unit to CommonTypesJohn Kåre Alsaker-0/+1
2018-11-29Use `Cow` in `Token::String`.Nicholas Nethercote-0/+4
`Printer::word` takes a `&str` and converts it into a `String`, which causes an allocation. But that allocation is rarely necessary, because `&str` is almost always a `&'static str` or a `String` that won't be used again. This commit changes `Token::String` so it holds a `Cow<'static, str>` instead of a `String`, which avoids a lot of allocations.
2018-11-27resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-2/+11
Use per-span hygiene in a few other places in resolve Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-10-29Rename other occs of (Code/File)Map to Source(Map/File) #51574David Lavati-8/+8
2018-10-23Add macro call span when lacking any other span in diagnosticEsteban Küber-0/+11
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-11/+3
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-09-30Auto merge of #54601 - cuviper:prep-1.31, r=Mark-Simulacrumbors-2/+2
Bump to 1.31.0 and bootstrap from 1.30 beta Closes #54594.
2018-09-28Auto merge of #54338 - orium:fix-macro-inc-comp, r=nrcbors-1/+1
Use full name to identify a macro in a `FileName`. Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`. Fixes #53097. r? @nrc
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-2/+2
2018-09-22Rollup merge of #54350 - Munksgaard:support-edition-in-doc-test, r=steveklabnikPietro Albini-1/+1
Support specifying edition in doc test Fixes #52623 r? @QuietMisdreavus
2018-09-19Add support for running doc test in specific editionPhilip Munksgaard-1/+1
2018-09-19Use full name to identify a macro in a `FileName`.Diogo Sousa-1/+1
Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`. Fixes #53097.
2018-09-16Treat `dyn` as a keyword in the 2018 editionvarkor-10/+9
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-09Auto merge of #53778 - petrochenkov:shadrelax2, r=nikomatsakisbors-0/+5
resolve: Relax shadowing restrictions on macro-expanded macros Previously any macro-expanded macros weren't allowed to shadow macros from outer scopes. Now only "more macro-expanded" macros cannot shadow "less macro-expanded" macros. See comments to `fn may_appear_after` and added tests for more details and examples. The functional changes are a21f6f588fc28c97533130ae44a6957b579ab58c and 46dd365ce9ca0a6b8653849b80267763c542842a, other commits are refactorings.
2018-09-09Stabilize the 2018 editionMark Rousskov-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-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
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-23Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakisbors-11/+13
Implement try block expressions I noticed that `try` wasn't a keyword yet in Rust 2018, so... ~~Fix​es https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135 cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-19Put `try` in the reserved list, not the in-use listScott McMurray-12/+5
2018-08-19Parse try blocks with the try keyword instead of do catch placeholderScott McMurray-1/+1
2018-08-19Add `try` to syntax_pos as an edition-2018-only keywordScott McMurray-10/+19
2018-08-19Rename `Catch` variants to `TryBlock`Scott McMurray-2/+2
(Not `Try` since `QuestionMark` is using that.)
2018-08-19mv codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-38/+38
2018-08-19mv FileMap SourceFileDonato Sciarra-27/+27
2018-08-19mv CodeMap SourceMapDonato Sciarra-7/+7
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-09[nll] libsyntax_pos: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-2/+0
2018-07-28Auto merge of #52355 - pietroalbini:zfeature, r=eddybbors-0/+5
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-28Rollup merge of #52703 - ljedrz:vec_improvements, r=nikomatsakiskennytm-5/+4
Improve a few vectors - calculate capacity or build from iterators Collecting from iterators improves readability and tailoring vector capacities should be beneficial in terms of performance.
2018-07-27Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributesPietro Albini-0/+5
2018-07-26Improve a few vectors - calculate capacity or build from iteratorsljedrz-5/+4
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0