about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
AgeCommit message (Collapse)AuthorLines
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
2016-09-19Add the ability to merge spans to codemapJonathan Turner-0/+82
2016-09-01incr.comp.: Add stable hashing of HIR spans to ICH.Michael Woerister-20/+4
2016-08-01Reimplemented tokenstreams as ropes and reduced the exposed TokenStream API.cgswords-0/+17
2016-07-14Remove more unused importsJonathan Turner-1/+0
2016-07-14Remove unused importsJonathan Turner-19/+0
2016-07-14Add back in import needed for codemap testsJonathan Turner-0/+1
2016-07-14Add fix for tabs. Move error unit tests->ui testsJonathan Turner-766/+4
2016-07-14Fix up some tidy-unfriendly spacingJonathan Turner-18/+18
2016-07-14DCE and fixing some internal testsJonathan Turner-98/+98
2016-07-14Remove BasicEmitterJonathan Turner-3/+3
2016-06-24Fix codemap tests to not double importJonathan Turner-1/+0
2016-06-24Reexport syntax_pos in codemap and fix some cfail testsJonathan Turner-1/+1
2016-06-23make old school mode a bit more configurableJonathan Turner-17/+28
2016-06-23Add missing refernce to RenderedLineJonathan Turner-1/+1
2016-06-23Move test helper functions to consolidated codemap testingJonathan Turner-0/+64
2016-06-23Actually consolidate the CodeMap testsJonathan Turner-0/+517
2016-06-23Consolidate codemap tests and fix more errors for travisJonathan Turner-0/+235
2016-06-23Address more travis errorsJonathan Turner-0/+1
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-655/+37
2016-06-16Add an abs_path member to FileMap, use it when writing debug info.Ted Mielczarek-16/+51
When items are inlined from extern crates, the filename in the debug info is taken from the FileMap that's serialized in the rlib metadata. Currently this is just FileMap.name, which is whatever path is passed to rustc. Since libcore and libstd are built by invoking rustc with relative paths, they wind up with relative paths in the rlib, and when linked into a binary the debug info uses relative paths for the names, but since the compilation directory for the final binary, tools trying to read source filenames will wind up with bad paths. We noticed this in Firefox with source filenames from libcore/libstd having bad paths. This change stores an absolute path in FileMap.abs_path, and uses that if available for writing debug info. This is not going to magically make debuggers able to find the source, but it will at least provide sensible paths.