1
Fork 0
rust/compiler/rustc_interface/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
..
callbacks.rs Simplify tls::enter_context. 2023-02-09 15:25:45 +11:00
errors.rs Remove a back compat warning 2023-02-22 19:39:03 +00:00
interface.rs Improve with_source_map. 2023-03-31 15:57:25 +11:00
lib.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
passes.rs Rollup merge of #109231 - Zoxc:fs-non-canon, r=eholk 2023-03-23 19:55:45 +01:00
proc_macro_decls.rs rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00
queries.rs rustc_interface: Add a new query pre_configure 2023-03-23 14:22:48 +04:00
tests.rs Add -Z time-passes-format to allow specifying a JSON output for -Z time-passes 2023-03-21 18:18:25 +01:00
util.rs Rollup merge of #108480 - Zoxc:rayon-tlv, r=cuviper 2023-03-28 12:51:12 +02:00