Skip to content

Commit

Permalink
Auto merge of #122747 - Urgau:non-local-defs_perfect_impl, r=lcnr
Browse files Browse the repository at this point in the history
Implement T-types suggested logic for perfect non-local impl detection

This implement [T-types suggested logic](rust-lang/rust#121621 (comment)) for perfect non-local impl detection:

> for each impl, instantiate all local types with inference vars and then assemble candidates for that goal, if there are more than 1 (non-private impls), it does not leak

This extension to the current logic is meant to address issues reported in rust-lang/rust#121621.

This PR also re-enables the lint `non_local_definitions` to warn-by-default.

Implementation was discussed in this [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/Implementing.20new.20non-local.20impl.20defs.20logic).

Fixes rust-lang/rust#121621
Fixes rust-lang/rust#121746

r? `@lcnr` *(feel free to re-roll)*
  • Loading branch information
bors committed Apr 5, 2024
2 parents 4513f0f + a61edcc commit 171f99f
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 171f99f

Please sign in to comment.