diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-24 17:09:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-24 17:09:00 +0200 |
| commit | cb651300eca7c034a5779dca040e921fddcad029 (patch) | |
| tree | e657aa40300f4f94bd1b84e0da0abf23124c79c8 /compiler/rustc_mir_transform/src/coverage/tests.rs | |
| parent | 0aade2f0de4561823875df84ca79af1017833f48 (diff) | |
| parent | 269d5a322e35490513612ba1ed1afd80a982cfe7 (diff) | |
| download | rust-cb651300eca7c034a5779dca040e921fddcad029.tar.gz rust-cb651300eca7c034a5779dca040e921fddcad029.zip | |
Rollup merge of #117091 - compiler-errors:debug, r=lcnr
`OptWithInfcx` naming nits, trait bound simplifications
* Use an associated type `Interner` on `InferCtxtLike` to remove a redundant interner parameter (`I: Interner, Infcx: InferCtxtLike<I>` -> `Infcx: InferCtxtLike`).
* Remove double-`Option` between `infcx: Option<Infcx>` and `fn universe_of_ty(&self, ty: ty::InferTy) -> Option<ty::UniverseIndex>`. We don't need the infcx to be optional if we can provide a "noop" (`NoInfcx`) implementation that just always returns `None` for universe index.
* Also removes the `core::convert::Infallible` implementation which I found a bit weird...
* Some naming nits with params.
* I found `InferCtxt` + `InfCtx` and `Infcx` to be a lot of different ways to spell "inference context", so I got rid of the `InfCtx` type parameter name in favor of `Infcx` which is a more standard name.
* I found `OptWithInfcx` to be a bit redundant -> `WithInfcx`.
I'm making these changes because I intend to reuse the `InferCtxtLike` trait for uplifting the canonicalizer into a new trait -- conveniently, the information I need for uplifting the canonicalizer also is just the universe information of a type var, so it's super convenient 😸
r? `@BoxyUwU` or `@lcnr`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/tests.rs')
0 files changed, 0 insertions, 0 deletions
