rust/compiler/rustc_smir/src
Matthias Krüger c3e237c3ac
Rollup merge of #119833 - celinval:smir-accept-closures, r=oli-obk
Make tcx optional from StableMIR run macro and extend it to accept closures

Change `run` macro to avoid sometimes unnecessary dependency on `TyCtxt`, and introduce `run_with_tcx` to capture use cases where `tcx` is required. Additionally, extend both macros to accept closures that may capture variables.

I've also modified the `internal()` method to make it safer, by accepting the type context to force the `'tcx` lifetime to match the context lifetime.

These are non-backward compatible changes, but they only affect internal APIs which are provided today as helper functions until we have a stable API to start the compiler.
2024-01-18 10:34:17 +01:00
..
rustc_internal Revert changes to internal method for now 2024-01-17 19:59:57 -08:00
rustc_smir Revert changes to internal method for now 2024-01-17 19:59:57 -08:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00