rust/compiler/rustc_span/src
Nicholas Nethercote 4e63ab6fc1 Improve with_source_map.
Rename `with_source_map` as `set_source_map`. Because `with` functions
(e.g. `with_session_globals`, `scoped_tls::ScopedKey::with`) are for
*getting* a value for the duration of a closure, and `set` functions
(e.g. `set_session_globals_then` `scoped_tls::ScopedKey::with`) are for
*setting* a value for the duration of a closure.

Also fix up the comment, which is wrong:
- The bit about `TyCtxt` is wrong.
- `span_debug1` doesn't exist any more.
- There's only one level of fallback, not two.

(This is effectively a follow-up to the changes in #93936.)

Also add a comment explaining that `SessionGlobals::source_map` should
only be used when absolutely necessary.
2023-03-31 15:57:25 +11:00
..
analyze_source_file remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
edit_distance Add test for precise algorithm used 2023-02-19 22:59:22 +00:00
source_map Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
caching_source_map_view.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
def_id.rs Eagerly intern and check CrateNum/StableCrateId collisions 2023-03-21 12:08:17 +00:00
edit_distance.rs Make public API, docs algorithm-agnostic 2023-02-19 04:11:10 +00:00
edition.rs Rename rust_2015 => is_rust_2015 2023-02-02 08:17:13 +00:00
fatal_error.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
hygiene.rs Ignore Inlined spans when computing caller location. 2023-03-18 13:46:17 +00:00
lib.rs Improve with_source_map. 2023-03-31 15:57:25 +11:00
profiling.rs Remove an unnecessary use of with_session_globals. 2023-03-31 15:34:00 +11:00
source_map.rs Implementing "<test_binary> --list --format json" #107307 #49359 2023-03-15 14:20:20 -04:00
span_encoding.rs Intern span when length is MAX_LEN with parent. 2023-02-11 17:46:22 +00:00
symbol.rs Add a builtin FnPtr trait 2023-03-27 12:16:54 +00:00
tests.rs Lazify SourceFile::lines. 2022-06-01 10:36:39 +10:00