1
Fork 0

Auto merge of #120393 - Urgau:rfc3373-non-local-defs, r=WaffleLapkin

Implement RFC 3373: Avoid non-local definitions in functions

This PR implements [RFC 3373: Avoid non-local definitions in functions](https://github.com/rust-lang/rust/issues/120363).
This commit is contained in:
bors 2024-02-25 19:11:06 +00:00
commit b0d3e04ca9
59 changed files with 1518 additions and 92 deletions

View file

@ -24,6 +24,11 @@ struct InherentOverlapChecker<'tcx> {
tcx: TyCtxt<'tcx>,
}
rustc_index::newtype_index! {
#[orderable]
pub struct RegionId {}
}
impl<'tcx> InherentOverlapChecker<'tcx> {
/// Checks whether any associated items in impls 1 and 2 share the same identifier and
/// namespace.
@ -205,11 +210,6 @@ impl<'tcx> InherentOverlapChecker<'tcx> {
// This is advantageous to running the algorithm over the
// entire graph when there are many connected regions.
rustc_index::newtype_index! {
#[orderable]
pub struct RegionId {}
}
struct ConnectedRegion {
idents: SmallVec<[Symbol; 8]>,
impl_blocks: FxHashSet<usize>,