|  | 
| 34 | 34 | #![feature(let_chains)] | 
| 35 | 35 | #![feature(never_type)] | 
| 36 | 36 | #![recursion_limit = "256"] | 
| 37 |  | -#![allow(rustc::potential_query_instability)] | 
| 38 | 37 | #![deny(rustc::untranslatable_diagnostic)] | 
| 39 | 38 | #![deny(rustc::diagnostic_outside_of_impl)] | 
| 40 | 39 | 
 | 
| @@ -107,7 +106,7 @@ struct LoweringContext<'a, 'hir> { | 
| 107 | 106 |     /// Attributes inside the owner being lowered. | 
| 108 | 107 |     attrs: SortedMap<hir::ItemLocalId, &'hir [Attribute]>, | 
| 109 | 108 |     /// Collect items that were created by lowering the current owner. | 
| 110 |  | -    children: FxHashMap<LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>>, | 
|  | 109 | +    children: Vec<(LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>)>, | 
| 111 | 110 | 
 | 
| 112 | 111 |     generator_kind: Option<hir::GeneratorKind>, | 
| 113 | 112 | 
 | 
| @@ -611,8 +610,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { | 
| 611 | 610 |         self.impl_trait_defs = current_impl_trait_defs; | 
| 612 | 611 |         self.impl_trait_bounds = current_impl_trait_bounds; | 
| 613 | 612 | 
 | 
| 614 |  | -        let _old = self.children.insert(def_id, hir::MaybeOwner::Owner(info)); | 
| 615 |  | -        debug_assert!(_old.is_none()) | 
|  | 613 | +        debug_assert!(self.children.iter().find(|(id, _)| id == &def_id).is_none()); | 
|  | 614 | +        self.children.push((def_id, hir::MaybeOwner::Owner(info))); | 
| 616 | 615 |     } | 
| 617 | 616 | 
 | 
| 618 | 617 |     /// Installs the remapping `remap` in scope while `f` is being executed. | 
| @@ -719,8 +718,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { | 
| 719 | 718 | 
 | 
| 720 | 719 |                 assert_ne!(local_id, hir::ItemLocalId::new(0)); | 
| 721 | 720 |                 if let Some(def_id) = self.opt_local_def_id(ast_node_id) { | 
| 722 |  | -                    // Do not override a `MaybeOwner::Owner` that may already here. | 
| 723 |  | -                    self.children.entry(def_id).or_insert(hir::MaybeOwner::NonOwner(hir_id)); | 
|  | 721 | +                    self.children.push((def_id, hir::MaybeOwner::NonOwner(hir_id))); | 
| 724 | 722 |                     self.local_id_to_def_id.insert(local_id, def_id); | 
| 725 | 723 |                 } | 
| 726 | 724 | 
 | 
|  | 
0 commit comments