rust/compiler/rustc_interface
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
..
src Improve with_source_map. 2023-03-31 15:57:25 +11:00
Cargo.toml Update indexmap and rayon crates 2023-03-25 02:12:13 +01:00
messages.ftl Simplify message paths 2023-03-11 22:51:57 +01:00