This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
compiler/rustc_resolve/src Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ pub(crate) struct ImportData<'a> {
172172 pub used : Cell < bool > ,
173173}
174174
175+ /// All imports are unique and allocated on a same arena,
176+ /// so we can use referential equality to compare them.
175177pub ( crate ) type Import < ' a > = Interned < ' a , ImportData < ' a > > ;
176178
177179impl < ' a > ImportData < ' a > {
Original file line number Diff line number Diff line change @@ -514,6 +514,8 @@ struct ModuleData<'a> {
514514 expansion : ExpnId ,
515515}
516516
517+ /// All modules are unique and allocated on a same arena,
518+ /// so we can use referential equality to compare them.
517519#[ derive( Clone , Copy , PartialEq ) ]
518520#[ rustc_pass_by_value]
519521struct Module < ' a > ( Interned < ' a , ModuleData < ' a > > ) ;
@@ -661,6 +663,8 @@ struct NameBindingData<'a> {
661663 vis : ty:: Visibility < DefId > ,
662664}
663665
666+ /// All name bindings are unique and allocated on a same arena,
667+ /// so we can use referential equality to compare them.
664668type NameBinding < ' a > = Interned < ' a , NameBindingData < ' a > > ;
665669
666670trait ToNameBinding < ' a > {
You can’t perform that action at this time.
0 commit comments