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> {
172
172
pub used: Cell<bool>,
173
173
}
174
174
175
+ /// All imports are unique and allocated on a same arena,
176
+ /// so we can use referential equality to compare them.
175
177
pub(crate) type Import<'a> = Interned<'a, ImportData<'a>>;
176
178
177
179
impl<'a> ImportData<'a> {
Original file line number Diff line number Diff line change @@ -514,6 +514,8 @@ struct ModuleData<'a> {
514
514
expansion: ExpnId,
515
515
}
516
516
517
+ /// All modules are unique and allocated on a same arena,
518
+ /// so we can use referential equality to compare them.
517
519
#[derive(Clone, Copy, PartialEq)]
518
520
#[rustc_pass_by_value]
519
521
struct Module<'a>(Interned<'a, ModuleData<'a>>);
@@ -661,6 +663,8 @@ struct NameBindingData<'a> {
661
663
vis: ty::Visibility<DefId>,
662
664
}
663
665
666
+ /// All name bindings are unique and allocated on a same arena,
667
+ /// so we can use referential equality to compare them.
664
668
type NameBinding<'a> = Interned<'a, NameBindingData<'a>>;
665
669
666
670
trait ToNameBinding<'a> {
You can’t perform that action at this time.
0 commit comments