diff options
| author | lcnr <rust@lcnr.de> | 2024-12-03 13:49:12 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-12-03 14:07:04 +0100 |
| commit | 8a47b442c431efcaba7e257c509b9b8d2337e37a (patch) | |
| tree | bde4eba127a9fa7c253d8c8c7a645c4edd62ff10 /compiler/rustc_codegen_llvm/src | |
| parent | 67defd72e6a39a3a339ebe925ffb6f5a35f5a04e (diff) | |
| download | rust-8a47b442c431efcaba7e257c509b9b8d2337e37a.tar.gz rust-8a47b442c431efcaba7e257c509b9b8d2337e37a.zip | |
closure requirements: don't replace bivariant opaque args
It is unnecessary, these get constrained when checking that the opaque type is well-formed. It also results in the opaque type no longer being well formed. If you've got `fn foo<'a>() -> impl Sized + 'a` the opaque is `type Opaque<'a, 'aDummy> where 'a: 'aDummy, 'aDummy: 'a` where `'aDummy` is bivariant. If we call `foo::<'b>()` inside of a closure and its return type ends up in a type test, we start out with the WF `Opaque<'b, 'b>`, and then replace the bivariant `'b` with `'static`. `Opaque<'b, 'static>` is no longer well-formed. Given how these type tests are used, I don't think this caused any practical issues.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
