about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
AgeCommit message (Collapse)AuthorLines
2018-08-19mv (mod) codemap source_mapDonato Sciarra-1235/+0
2018-08-19mv filemap source_fileDonato Sciarra-44/+44
2018-08-19mv FileMap SourceFileDonato Sciarra-28/+28
2018-08-19mv CodeMap SourceMapDonato Sciarra-29/+29
2018-07-11Rollup merge of #52224 - ljedrz:dyn_libsyntax, r=oli-obkMark Rousskov-2/+2
Deny bare trait objects in in src/libsyntax Enforce `#![deny(bare_trait_objects)]` in `src/libsyntax`.
2018-07-10Deny bare trait objects in in src/libsyntaxljedrz-2/+2
2018-07-09find and highlight the `&` or `'_` in `region_name`Niko Matsakis-0/+9
2018-06-30Fortify dummy span checkingVadim Petrochenkov-1/+1
2018-06-27syntax_pos: Store multibyte char size as u8 instead of u32.Michael Woerister-2/+2
2018-06-27Use u32 instead of usize of encoding byte count of multi-byte chars.Michael Woerister-3/+3
2018-06-27Update CodeMap tests after changing FileMap construction.Michael Woerister-61/+10
2018-06-27Remove the now redundant CodeMap::new_filemap_with_lines() method.Michael Woerister-11/+3
2018-06-27Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.Michael Woerister-24/+16
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-1/+1
2018-05-21Satisfy tidyOliver Schneider-2/+2
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-0/+72
2018-03-18CodeMap functions refactored.Yukio Siraichi-50/+38
- Using `span_take_while` to implement others.
2018-03-18Review fixes.Yukio Siraichi-0/+16
- `span_suggestion` changed to `span_suggestion_short`; - `Span` used changed to contain only `&` refs; - Tests passing.
2018-03-17Auto merge of #48904 - Zoxc:code-and-file-maps, r=michaelwoeristerbors-38/+40
Make CodeMap and FileMap thread-safe r? @michaelwoerister
2018-03-15Use a single Lock for CodeMap.stable_id_to_filemap and CodeMap.filesJohn Kåre Alsaker-24/+31
2018-03-15Make CodeMap thread-safeJohn Kåre Alsaker-22/+17
2018-03-15Require a thread-safe file loaderJohn Kåre Alsaker-2/+2
2018-03-14Some tweaks to "type parameters from outer function" diagnosticEsteban Küber-7/+15
Follow up to #47574.
2018-03-08Add codemap functions to retrieve the source before a given spanBasile Desloges-3/+63
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-17/+17
2018-03-01Rollup merge of #48522 - ↵Manish Goregaokar-8/+11
etaoins:fix-find-width-of-character-at-span-bounds-check, r=estebank Fix find_width_of_character_at_span bounds check Commit 0bd96671f0 added bounds checking of our current target byte position to prevent infinite loops. Unfortunately it was comparing the file-relative `target` versus the global `file_start_pos` and `file_end_pos`. The result is failing to detect multibyte characters unless their file-relative offset fit within their global offset. This causes other parts of the compiler to generate spans pointing to the middle of a multibyte character which will ultimately panic in `bytepos_to_file_charpos`. Fix by comparing the `target` to the total file size when moving forward and doing checked subtraction when moving backwards. This should preserve the intent of the bounds check while removing the offset confusion. cc @davidtwco Fixes #48508
2018-02-25Fix find_width_of_character_at_span bounds checkRyan Cumming-8/+11
Commit 0bd96671f0 added bounds checking of our current target byte position to prevent infinite loops. Unfortunately it was comparing the file-relative `target` versus the global relative `file_start_pos` and `file_end_pos`. The result is failing to detect multibyte characters unless their file-relative offset fit within their global offset. This causes other parts of the compiler to generate spans pointing to the middle of a multibyte character which will ultimately panic in `bytepos_to_file_charpos`. Fix by comparing the `target` to the total file size when moving forward and doing checked subtraction when moving backwards. This should preserve the intent of the bounds check while removing the offset confusion. Fixes #48508
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-16Remove unneeded string allocationsAlex Crawford-4/+4
2018-02-12Remove allocation from width of character function.Mark Simulacrum-3/+5
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