Skip to content

Commit b0d3e04

Browse files
committedFeb 25, 2024
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](#120363).
2 parents 8c0b1fc + 63469ab commit b0d3e04

File tree

59 files changed

+1518
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1518
-92
lines changed
 

‎Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -4101,6 +4101,7 @@ dependencies = [
41014101
"rustc_target",
41024102
"rustc_trait_selection",
41034103
"rustc_type_ir",
4104+
"smallvec",
41044105
"tracing",
41054106
"unicode-security",
41064107
]

‎compiler/rustc_hir_analysis/src/coherence/inherent_impls_overlap.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ struct InherentOverlapChecker<'tcx> {
2424
tcx: TyCtxt<'tcx>,
2525
}
2626

27+
rustc_index::newtype_index! {
28+
#[orderable]
29+
pub struct RegionId {}
30+
}
31+
2732
impl<'tcx> InherentOverlapChecker<'tcx> {
2833
/// Checks whether any associated items in impls 1 and 2 share the same identifier and
2934
/// namespace.
@@ -205,11 +210,6 @@ impl<'tcx> InherentOverlapChecker<'tcx> {
205210
// This is advantageous to running the algorithm over the
206211
// entire graph when there are many connected regions.
207212

208-
rustc_index::newtype_index! {
209-
#[orderable]
210-
pub struct RegionId {}
211-
}
212-
213213
struct ConnectedRegion {
214214
idents: SmallVec<[Symbol; 8]>,
215215
impl_blocks: FxHashSet<usize>,

0 commit comments

Comments
 (0)
Please sign in to comment.