Error on define_opaques
entries without any opaques actually referenced
This commit is contained in:
parent
43e39260f9
commit
69a1bb8bdb
6 changed files with 17 additions and 7 deletions
|
@ -1696,7 +1696,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
);
|
||||
return None;
|
||||
};
|
||||
Some(did)
|
||||
Some((self.lower_span(path.span), did))
|
||||
});
|
||||
let define_opaque = self.arena.alloc_from_iter(define_opaque);
|
||||
self.define_opaque = Some(define_opaque);
|
||||
|
|
|
@ -99,7 +99,7 @@ struct LoweringContext<'a, 'hir> {
|
|||
/// Bodies inside the owner being lowered.
|
||||
bodies: Vec<(hir::ItemLocalId, &'hir hir::Body<'hir>)>,
|
||||
/// `#[define_opaque]` attributes
|
||||
define_opaque: Option<&'hir [LocalDefId]>,
|
||||
define_opaque: Option<&'hir [(Span, LocalDefId)]>,
|
||||
/// Attributes inside the owner being lowered.
|
||||
attrs: SortedMap<hir::ItemLocalId, &'hir [hir::Attribute]>,
|
||||
/// Collect items that were created by lowering the current owner.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue