summary refs log tree commit diff
path: root/src/libsyntax_pos/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-1/+5
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-17Make Span and Symbol implement Send and SyncJohn Kåre Alsaker-1/+5
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-2/+9
2018-03-15Make FileMap thread-safeJohn Kåre Alsaker-30/+37
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-1/+22
2018-03-05while let all the thingsleonardo.yvens-6/+1
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-8/+8
2018-02-28Rollup merge of #48359 - jsgf:remap-path-prefix, r=sanxiynManish Goregaokar-1/+1
Fixes #47311. r? @nrc
2018-02-22Implement --remap-path-prefixJeremy Fitzhardinge-1/+1
Remove experimental -Zremap-path-prefix-from/to, and replace it with the stabilized --remap-path-prefix=from=to variant. This is an implementation for issue of #41555.
2018-02-18Fix up tests and typosSeiichi Uchida-1/+1
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-0/+6
2018-02-02Rollup merge of #47942 - estebank:macro-spans, r=nikomatsakis Minimize weird ↵kennytm-6/+17
spans involving macro context Sometimes the parser attempts to synthesize spans from within a macro context with the span for the captured argument, leading to non-sensical spans with very bad output. Given that an incorrect span is worse than a partially incomplete span, when detecting this situation return only one of the spans without merging them. Fix #32072, #47778. CC #23480.
2018-02-01Minimize weird spans involving macro contextEsteban Küber-6/+17
Sometimes the parser attempts to synthesize spans from within a macro context with the span for the captured argument, leading to non-sensical spans with very bad output. Given that an incorrect span is worse than a partially incomplete span, when detecting this situation return only one of the spans without mergin them.
2018-01-27end_point handling multibyte characters correctly.David Wood-16/+0
2018-01-27Moved overflow check into end_point function.David Wood-1/+3
2017-12-19incr.comp.: Precompute small hash for filenames to save some work.Michael Woerister-5/+21
2017-12-15incr.comp.: Revert hashing optimization that caused regression.Michael Woerister-33/+0
2017-12-14incr.comp.: Do less hashing per Span.Michael Woerister-12/+44
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-10/+80
2017-12-06Auto merge of #45953 - estebank:tab-4, r=nikomatsakisbors-3/+12
Display `\t` in diagnostics code as four spaces Follow up to #44386 using the unicode variable width machinery from #45711 to replace tabs in the source code when displaying a diagnostic error with four spaces (instead of only one), while properly accounting for this when calculating underlines. Partly addresses #44618.
2017-12-01incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.Michael Woerister-0/+5
The previous method ran into problems because ICH would treat Spans as (file,line,col) but the cache contained byte offsets and its possible for the latter to change while the former stayed stable.
2017-11-24Display `\t` in diagnostics code as four spacesEsteban Küber-3/+12
2017-11-03Display spans correctly when there are non-half-width charactersWonwoo Choi-4/+91
2017-10-29Optimize some span operationsVadim Petrochenkov-25/+52
Decode span data only once
2017-10-10Rollup merge of #44775 - MaloJaffre:debug-struct, r=sfacklerkennytm-2/+5
Refactor to use `debug_struct` in several Debug impls Also use `pad` and derive `Debug` for `Edge`. Fixes #44771.
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-2/+5
Fixes #44771.
2017-10-03Rename FileMap::path and change to an OptionPhilip Craig-5/+6
2017-09-30Don't use remapped path when loading modules and include filesPhilip Craig-0/+6
2017-09-23Compress "small" spans to 32 bits and intern "large" spansVadim Petrochenkov-26/+38
2017-09-09Add `impl From<Vec<Span>> for MultiSpan`.Sergio Benitez-0/+6
2017-09-03enable desugaring-sensitive error messages and use them in TryAriel Ben-Yehuda-0/+12
Maybe I should allow error messages to check the *specific* desugaring? Thanks @huntiep for the idea!
2017-08-30Make fields of `Span` public againVadim Petrochenkov-3/+15
This helps to avoid landing changes to rustc and rustfmt in one step
2017-08-30Normalize order of `lo` and `hi` in `Span::new`Vadim Petrochenkov-1/+1
2017-08-30Make fields of `Span` privateVadim Petrochenkov-51/+69
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-18Auto merge of #43832 - huntiep:compiler-desugaring-enum, r=nikomatsakisbors-1/+12
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-15use field init shorthand EVERYWHEREZack M. Davis-15/+15
Like #43008 (f668999), but _much more aggressive_.
2017-08-12Implement CompilerDesugaringKind enumHunter Praska-1/+12
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+10
2017-08-01syntax: avoid loading the same source-file multiple timesAriel Ben-Yehuda-1/+4
We already had a cache for file contents, but we read the source-file before testing the cache, causing obvious slowness, so this just avoids loading the source-file when the cache already has the contents.
2017-07-27Give span to angle bracketed generic argumentsVadim Petrochenkov-0/+6
2017-07-23Fix some doc/comment typos.Bruce Mitchener-1/+1
2017-07-21Review commentsEsteban Küber-21/+10
2017-07-20Use the macro structure spans instead of the invocationEsteban Küber-4/+24
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-1/+1
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-06-19Bump version and stage0 compilerAlex Crichton-6/+2
2017-06-12External spans: address review.Inokentiy Babushkin-15/+20
* The lazy loading mechanism has been moved to a more appropriate place. * Return values from the functions invoked there are properly used. * Documentation has gotten some minor improvements. * Possibly some larger restructuring will need to take place still.
2017-06-11Added hash verification to external source loading.Inokentiy Babushkin-0/+20
2017-06-11Added consumption logic for external sources in FileMapInokentiy Babushkin-18/+28
We now fetch source lines from the `external_src` member as a secondary fallback if no regular source is present, that is, if the file map belongs to an external crate and the source has been fetched from disk.