about summary refs log tree commit diff
path: root/src/libsyntax_pos/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-06-09Introduce InnerSpan abstractionMark Rousskov-3/+15
This should be used when trying to get at subsets of a larger span, especially when the larger span is not available in the code attempting to work with those subsets (especially common in the fmt_macros crate). This is usually a good replacement for (BytePos, BytePos) and (usize, usize) tuples. This commit also removes from_inner_byte_pos, since it took usize arguments, which is error prone.
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-05Add `modernize_and_adjust` methods.Nicholas Nethercote-0/+8
These combine two `HygieneData::with` calls into one.
2019-06-05Move `modern` calls inside `glob_adjust` and `reverse_glob_adjust`.Nicholas Nethercote-5/+4
2019-05-29Introduce and use `SyntaxContext::outer_expn_info()`.Nicholas Nethercote-10/+10
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-21Move `edition` outside the hygiene lock and avoid accessing itJohn Kåre Alsaker-3/+7
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-1/+1
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-2/+2
2019-05-13Rename `syntax::symbol::symbols` as `syntax::symbol::sym`.Nicholas Nethercote-1/+1
Because it's going to be used a lot.
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-15Use a proc macro to declare preallocated symbolsJohn Kåre Alsaker-0/+2
2019-04-05remove lookup_char_pos_adjAleksey Kladov-12/+1
It is now exactly equivalent to lookup_char_pos.
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-26bump bootstrap; adjust stage0 uses in libsyntax_posMazdak Farrokhzad-1/+0
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-21/+21
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkovbors-2/+6
Require a list of features in `#[allow_internal_unstable]` The blanket-permission slip is not great and will likely give us trouble some point down the road.
2019-02-11Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocsOliver Scherer-2/+3
2019-02-11Ease the transition to requiring features by just warning if there's no ↵Oliver Scherer-1/+4
feature list while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-2/+2
2019-02-10rustc: doc commentsAlexander Regueiro-21/+21
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-04libsyntax_pos => 2018Taiki Endo-26/+15
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-2/+2
2019-01-21Fix typovarkor-1/+1
Co-Authored-By: estebank <estebank@users.noreply.github.com>
2019-01-21Fix typovarkor-1/+1
Co-Authored-By: estebank <estebank@users.noreply.github.com>
2019-01-20Use is_dummy instead of comparing against DUMMY_SPEsteban Küber-2/+2
2019-01-20Remove unnecessary dummy span checksEsteban Küber-0/+10
The emitter already verifies wether a given span note or span label can be emitted to the output. If it can't, because it is a dummy span, it will be either elided for labels or emitted as an unspanned note/help when applicable.
2018-12-25Remove licensesMark Rousskov-10/+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-12Use a `newtype_index!` within `Symbol`.Nicholas Nethercote-0/+3
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-07Various minor/cosmetic improvements to codeAlexander Regueiro-81/+81
2018-12-06Fix printing of spans with no TyCtxtJohn Kåre Alsaker-1/+1
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-11-29Add inline attributes and add unit to CommonTypesJohn Kåre Alsaker-0/+1
2018-11-27resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-0/+10
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-5/+5
2018-10-23Add macro call span when lacking any other span in diagnosticEsteban Küber-0/+11
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-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-2/+2
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-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-19mv codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-3/+3
2018-08-19mv FileMap SourceFileDonato Sciarra-26/+26
2018-08-19mv CodeMap SourceMapDonato Sciarra-7/+7
2018-08-09[nll] libsyntax_pos: enable feature(nll) for bootstrapmemoryruins-0/+1