about summary refs log tree commit diff
path: root/compiler/rustc_span/src/source_map
AgeCommit message (Collapse)AuthorLines
2025-05-05Take into-account `-Zremap-path-scope` when embedding filenamesUrgau-0/+73
2025-02-03tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc`Askar Safin-1/+1
2024-10-07Avoid another `&Lrc<..>` in a return value.Nicholas Nethercote-1/+1
2024-10-01add unstable support for outputting file checksums for use in cargoJacob Kiesel-0/+2
2024-07-18Be more accurate about calculating `display_col` from a `BytePos`Esteban Küber-2/+0
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter. This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2): ``` error: this file contains an unclosed delimiter --> $DIR/issue-68629.rs:5:17 | LL | ␜␟ts␀![{i | -- unclosed delimiter | | | unclosed delimiter LL | ␀␀ fn rݻoa>rݻm | ^ ```
2024-04-03rustc_index: Add a `ZERO` constant to index typesVadim Petrochenkov-1/+1
It is commonly used.
2024-02-18By tracking import use types to check whether it is scope uses or the other ↵surechen-2/+0
situations like module-relative uses, we can do more accurate redundant import checking. fixes #117448 For example unnecessary imports in std::prelude that can be eliminated: ```rust use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly use std::option::Option::None; //~ WARNING the item `None` is imported redundantly ```
2024-02-07Update testsr0cky-47/+2
2024-01-06rustc_span: Optimize syntax context comparisonsVadim Petrochenkov-1/+1
Including comparisons with root context
2023-12-19Unify SourceFile::name_hash and StableSourceFileIdMichael Woerister-2/+2
2023-12-10remove redundant importssurechen-2/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-10-17[RFC 3127 - Trim Paths]: Condition remapped filepath on remap scopesUrgau-16/+32
2023-09-20Add unit tests based on files that return odd sizes to statBen Kimock-0/+27
2023-09-07Use `Freeze` for `SourceFile.lines`John Kåre Alsaker-2/+2
2023-09-03Register the file while computing its start position.Camille GILLOT-1/+1
2023-09-03Use relative positions inside a SourceFile.Camille GILLOT-4/+3
2023-01-19Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkovbors-1/+1
Various cleanups around pre-TyCtxt queries and functions part of #105462 based on https://github.com/rust-lang/rust/pull/106776 (everything starting at [0e2b39f](https://github.com/rust-lang/rust/pull/106810/commits/0e2b39fd1ffde51b50d45ccbe41de52b85136b8b) is new in this PR) r? `@petrochenkov` I think this should be most of the uncontroversial part of #105462.
2023-01-16Avoid an unnecessary allocationOli Scherer-1/+1
2023-01-14Heuristically undo path prefix mappings.Tim Neumann-0/+43
Because the compiler produces better diagnostics if it can find the source of (potentially remapped) dependencies.
2022-10-25Fix #103451, find_width_of_character_at_span return width with 1 when ↵yukang-5/+6
reaching end
2022-10-19Add testcase for next_point, fix more trivial issues in ↵yukang-0/+45
find_width_of_character_at_span
2022-08-08Remove unused parameter.Camille GILLOT-1/+0
2022-08-06Encode index of SourceFile along with span.Camille GILLOT-0/+1
2022-05-18Add tests for FilePathMapping::to_embeddable_absolute_path().Michael Woerister-41/+128
2022-04-29Fix duplicate directory separator in --remap-path-prefix.Michael Woerister-0/+80
2021-05-11Split span_to_string into span_to_diagnostic/embeddable_stringAndy Wang-1/+1
2021-05-05Rename RealFileName::Named to LocalPath and Devirtualized to RemappedAndy Wang-2/+0
2021-03-17Move some test-only code to test filesJoshua Nelson-0/+44
This also relaxes the bounds on some structs and moves them to the impl block instead.
2021-02-18Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.Eduard-Mihai Burtescu-1/+1
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2020-08-30mv compiler to compiler/mark-0/+272