about summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2017-12-01incr.comp.: Properly hash and encode macro expansion information.Michael Woerister-4/+29
2017-11-24Display `\t` in diagnostics code as four spacesEsteban Küber-3/+12
2017-11-13Fix style in interner testJohn-John Tedro-1/+1
2017-11-06Auto merge of #45758 - nzig:explain-span-ctxt, r=petrochenkovbors-3/+5
Add comment explaining the ctxt field in Span As discussed in #45747. r? @petrochenkov
2017-11-05Fix comment formattingNadav Zingerman-2/+2
2017-11-04Auto merge of #45711 - tirr-c:unicode-span, r=estebankbors-4/+92
Display spans correctly when there are zero-width or wide characters Hopefully... * fixes #45211 * fixes #8706 --- Before: ``` error: invalid width `7` for integer literal --> unicode_2.rs:12:25 | 12 | let _ = ("a̐éö̲", 0u7); | ^^^ | = help: valid widths are 8, 16, 32, 64 and 128 error: invalid width `42` for integer literal --> unicode_2.rs:13:20 | 13 | let _ = ("아あ", 1i42); | ^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 error: aborting due to 2 previous errors ``` After: ``` error: invalid width `7` for integer literal --> unicode_2.rs:12:25 | 12 | let _ = ("a̐éö̲", 0u7); | ^^^ | = help: valid widths are 8, 16, 32, 64 and 128 error: invalid width `42` for integer literal --> unicode_2.rs:13:20 | 13 | let _ = ("아あ", 1i42); | ^^^^ | = help: valid widths are 8, 16, 32, 64 and 128 error: aborting due to 2 previous errors ``` Spans might display incorrectly on the browser. r? @estebank
2017-11-04Add comment explaining the ctxt field in SpanNadav Zingerman-1/+3
2017-11-03add `auto` keyword, parse `auto trait`, lower to HIRleonardo.yvens-5/+6
Adds an `IsAuto` field to `ItemTrait` which flags if the trait was declared as an `auto trait`. Auto traits cannot have generics nor super traits.
2017-11-03Display spans correctly when there are non-half-width charactersWonwoo Choi-4/+92
2017-10-29Optimize some span operationsVadim Petrochenkov-25/+52
Decode span data only once
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-4/+5
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-27/+182
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-31Implement From<&str> for Symbol.Eduard-Mihai Burtescu-0/+6
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-4/+35
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-16/+16
Like #43008 (f668999), but _much more aggressive_.
2017-08-12Implement CompilerDesugaringKind enumHunter Praska-4/+47
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+13
2017-08-02Auto merge of #43584 - arielb1:unused-reads, r=eddybbors-1/+4
Fix quadratic performance with lots of use statements This fixes 2 problems that caused quadratic performance when lots of use-statements were present. After this patch, performance is linear (and very fast) even with 1M uses. Fixes #43572. Fixes #43573. r? @eddyb
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-30resolve: Fix instability in import suggestionsVadim Petrochenkov-1/+1
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-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-63/+63
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-64/+63
2017-06-29Make `$crate` a keywordVadim Petrochenkov-51/+52
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-16/+10
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.
2017-06-11Improved lazy external source loading and inserted calls.Inokentiy Babushkin-1/+22
2017-06-10Added external crates' sources to FileMap.Inokentiy Babushkin-0/+13
They are now handled in their own member to prevent mutating access to the `src` member. This way, we can safely load external sources, while keeping the mutation of local source strings off-limits.
2017-06-10Moved FileMap construction to it's own constructor.Inokentiy Babushkin-0/+38
The rationale is that BOM stripping is needed for lazy source loading for external crates, and duplication can be avoided by moving the corresponding functionality to libsyntax_pos.
2017-06-10Added source hashes to FileMapInokentiy Babushkin-3/+10
We can use these to perform lazy loading of source files belonging to external crates. That way we will be able to show the source code of external spans that have been translated.
2017-06-05syntax_pos::Symbol should not implement SyncWesley Wiser-0/+1
Fixes #42407
2017-05-25Improve intercrate hygiene.Jeffrey Seyfried-2/+13
2017-05-25Improve efficiency.Jeffrey Seyfried-16/+45