about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/graph.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2025-09-06 14:39:05 -0400
committerGitHub <noreply@github.com>2025-09-06 14:39:05 -0400
commitd3d5c7f9bd042f9c67733544d5dcc665ae25dc31 (patch)
tree50a90eccfc6df26cbd12949597a3a54310790a7a /compiler/rustc_mir_transform/src/coverage/graph.rs
parentebde667698e4fc2c48ede70c7169d2b2ee7e8afb (diff)
parent381b3267aeebf1b3b6d400af6b9b0f2cc62ba390 (diff)
downloadrust-d3d5c7f9bd042f9c67733544d5dcc665ae25dc31.tar.gz
rust-d3d5c7f9bd042f9c67733544d5dcc665ae25dc31.zip
Rollup merge of #146206 - lcnr:fix-non-defining-uses, r=BoxyUwU
identity uses are ok, even if there are no defining uses

fix rust-lang/rust#146191

I've tried moving the "is this an identity use" check to `fn clone_and_resolve_opaque_types` and this would allow the following code to compile as it now ignores `Opaque<'!a> = Opaque<'!a>` while they previously resulted in errors https://github.com/rust-lang/rust/blob/71289c378d0a406a4f537fe4001282d19362931f/tests/ui/type-alias-impl-trait/hkl_forbidden.rs#L42-L46

The closure signature gets inferred to `for<'a> fn(&'a ()) -> Inner<'a>`. The closure then has a defining use `Inner<'a_latbound> = &'a_latebound ()` while the parent function has a non-defining `Inner<'!a> = Inner<'!a>`. By eagerly discarding identity uses we don't error on the non-defining use in the parent.

r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions