about summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-60/+0
2018-12-23Rollup merge of #57020 - estebank:return-span, r=zackmdavisMazdak Farrokhzad-0/+7
Point to cause of `fn` expected return type Fix #48136.
2018-12-20Point at coercion source on type errors for fn returning `impl Trait`Esteban Küber-0/+7
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-14Rollup merge of #56699 - nnethercote:SymbolIndex, r=oli-obkkennytm-22/+42
Use a `newtype_index!` within `Symbol`. This shrinks `Option<Symbol>` from 8 bytes to 4 bytes, which shrinks `Token` from 24 bytes to 16 bytes. This reduces instruction counts by up to 1% across a range of benchmarks. r? @oli-obk
2018-12-12Bump to 1.33.0Alex Crichton-1/+1
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-12Use a `newtype_index!` within `Symbol`.Nicholas Nethercote-22/+42
This shrinks `Option<Symbol>` from 8 bytes to 4 bytes, which shrinks `Token` from 24 bytes to 16 bytes. This reduces instruction counts by up to 1% across a range of benchmarks.
2018-12-10Update Cargo submodule and its dependenciesAlex Crichton-2/+1
Hopefully just another routine update! So far this starts to enable the `std::arch` in stage0 builds of rustc. This means that we may need stage0/not(stage0) in stdsimd itself, but more and more code is starting to use `std::arch` so I think it's time to start shifting the balance of work here.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-109/+112
2018-12-06Fix printing of spans with no TyCtxtJohn Kåre Alsaker-1/+1
2018-12-06Auto merge of #56392 - petrochenkov:regensym, r=oli-obkbors-1/+5
Delay gensym creation for "underscore items" (`use foo as _`/`const _`) until name resolution So they cannot be cloned by macros. See https://github.com/rust-lang/rust/pull/56303 for the discussion. Mostly fix cross-crate use of underscore items by inverting the "gensyms are lost in metadata" bug as described in https://github.com/rust-lang/rust/pull/56303#issuecomment-442464695. Fix unused import warnings for single-segment imports (first commit) and `use crate_name as _` imports (as specified in https://github.com/rust-lang/rust/pull/56303#issuecomment-442274118). Prohibit accidentally implemented `static _: TYPE = EXPR;` (cc https://github.com/rust-lang/rust/pull/55983). Add more tests for `use foo as _` imports.
2018-12-06Rollup merge of #56500 - ljedrz:cleanup_rest_of_const_lifetimes, r=zackmdavisPietro Albini-1/+1
cleanup: remove static lifetimes from consts A follow-up to https://github.com/rust-lang/rust/pull/56497.
2018-12-06Rollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakisPietro Albini-17/+24
libsyntax_pos: A few tweaks
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