about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
AgeCommit message (Collapse)AuthorLines
2018-02-02Auto merge of #47465 - estebank:include-space-after-mut, r=nikomatsakisbors-2/+24
Include space in suggestion `mut` in bindings Fix #46614.
2018-02-01Change offset to `0`Esteban Küber-1/+1
2018-01-27Fixed infinite loop issues and added some improved logging.David Wood-6/+20
2018-01-27Now handling case where span has same lo and hi.David Wood-1/+6
2018-01-27next_point now handles creating spans over multibyte characters.David Wood-5/+9
2018-01-27Replaced multi-byte character handling in end_point with potentially more ↵David Wood-23/+59
performant variant.
2018-01-27end_point handling multibyte characters correctly.David Wood-0/+37
2018-01-26review commentEsteban Küber-6/+4
2018-01-26Consider all whitespace when preparing spanEsteban Küber-2/+26
2018-01-10Use correct line offsets for doctests (fixes #45868)Manish Goregaokar-1/+35
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-0/+1
2017-12-25"incompatible arm" diagnostic span tweakEsteban Küber-0/+6
Use span label instead of span note for single line spans in "incompatible arm" diagnostic.
2017-12-19incr.comp.: Precompute small hash for filenames to save some work.Michael Woerister-0/+2
2017-12-15incr.comp.: Revert hashing optimization that caused regression.Michael Woerister-4/+22
2017-12-14incr.comp.: Do less hashing per Span.Michael Woerister-22/+4
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-33/+41
2017-12-02Auto merge of #46381 - estebank:expected-span, r=nikomatsakisbors-1/+1
Point to next token when it is in the expected line r? @nikomatsakis
2017-12-01incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.Michael Woerister-1/+1
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-29Point to next token when it is in the expected lineEsteban Küber-1/+1
2017-11-03Display spans correctly when there are non-half-width charactersWonwoo Choi-2/+40
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-0/+37
2017-10-16code suggestion for non-shorthand field patterns lintZack M. Davis-0/+11
We also edit the lint description to clarify that this is different from the struct field init shorthand.
2017-10-03Rename FileMap::path and change to an OptionPhilip Craig-6/+12
2017-09-30Don't use remapped path when loading modules and include filesPhilip Craig-2/+14
2017-08-30Make fields of `Span` privateVadim Petrochenkov-33/+27
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-14/+14
Like #43008 (f668999), but _much more aggressive_.
2017-08-12Fix some typosBastien Orivel-2/+2
2017-08-01syntax: avoid loading the same source-file multiple timesAriel Ben-Yehuda-2/+3
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-06-12External spans: added lazy source loading elsewhereInokentiy Babushkin-24/+25
* In other places where the `src` member of a file map is accessed, we now load and possibly work with external source as well.
2017-06-12External spans: address review.Inokentiy Babushkin-13/+3
* 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-11External spans: fixed unit tests and addressed review.Inokentiy Babushkin-3/+4
2017-06-11Added hash verification to external source loading.Inokentiy Babushkin-7/+2
2017-06-11Improved lazy external source loading and inserted calls.Inokentiy Babushkin-1/+1
2017-06-10Added external crates' sources to FileMap.Inokentiy Babushkin-0/+20
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-27/+3
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-0/+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-05-31Use callsite's span for macro calls on suggestionEsteban Küber-0/+9
When suggesting an appropriate mutability for a macro call, use the call span instead of the expanded macro's span.
2017-05-23incr.comp.: Track expanded spans instead of FileMaps.Michael Woerister-28/+0
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-2/+2
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-08incr.comp.: Hash more pieces of crate metadata to detect changes there.Michael Woerister-4/+39
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-32/+69
reproducible builds.
2017-04-12Add a way to get shorter spans until `char` for pointing at defsEsteban Küber-0/+19
```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | ^^^^^^^^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ``` vs ```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | _^ starting here... 11 | | x: X, 12 | | } | |_^ ...ending here: recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ```
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-4/+0
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-277/+14
2017-03-29Remove code in `syntax::codemap`.Jeffrey Seyfried-185/+0
2017-01-22Refactor `TokenStream`.Jeffrey Seyfried-17/+0
2016-11-28rustc: use Span's allow_internal_unstable instead of hir::BlockCheckMode.Eduard Burtescu-2/+6
2016-11-21Fix fallout in `rustdoc` and tests.Jeffrey Seyfried-7/+5
2016-10-05Rename Parser::last_span as prev_span.Nicholas Nethercote-3/+3
This is a [breaking-change] for libsyntax.
2016-09-20Check for overlapping and simplify unit testJonathan Turner-8/+3