diff options
| author | bors <bors@rust-lang.org> | 2022-05-25 03:53:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-25 03:53:39 +0000 |
| commit | 9fadabc879e0b16214e8216c1a63a597d1d5d36b (patch) | |
| tree | 8f2ff9cf4fa40d033fc3d8ec05ace457facbbed7 /compiler/rustc_codegen_llvm/src | |
| parent | 6ac8adad1f7d733b5b97d1df4e7f96e73a46db42 (diff) | |
| parent | d1a9a9551741c3e888d350d8d4f4821a5addccb2 (diff) | |
| download | rust-9fadabc879e0b16214e8216c1a63a597d1d5d36b.tar.gz rust-9fadabc879e0b16214e8216c1a63a597d1d5d36b.zip | |
Auto merge of #97376 - compiler-errors:lazy-polymorphic, r=jackh726
Make `Lazy*<T>` types in `rustc_metadata` not care about lifetimes until decode This allows us to remove the `'tcx` lifetime from `CrateRoot`. This is necessary because of #97287, which makes the `'tcx` lifetime on `Ty` invariant instead of covariant, so [this hack](https://github.com/rust-lang/rust/blob/0a437b2ca081bc12425a3318cb66aade9824cbae/compiler/rustc_metadata/src/rmeta/decoder.rs#L89-92) no longer holds under that PR. Introduces a trait called `ParameterizedOverTcx` which has a generic associated type that allows a type to be parameterized over that lifetime. This means we can decode, for example, `Lazy<Ty<'static>>` into any `Ty<'tcx>` depending on the `TyCtxt<'tcx>` we pass into the decode function.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
