Skip to content

Commit e88d117

Browse files
committed
add resolver to attr parser
1 parent 2f32eea commit e88d117

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ impl<'sess> AttributeParser<'sess> {
213213
attrs: &'a [ast::Attribute],
214214
target_span: Span,
215215
omit_doc: OmitDoc,
216-
217216
lower_span: impl Copy + Fn(Span) -> Span,
218217
) -> Vec<Attribute> {
219218
let mut attributes = Vec::new();

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use rustc_serialize::{Decodable, Encodable};
4848
use rustc_session::lint::LintBuffer;
4949
pub use rustc_session::lint::RegisteredTools;
5050
use rustc_span::hygiene::MacroKind;
51-
use rustc_span::{ExpnId, ExpnKind, Ident, Span, Symbol, kw, sym};
51+
use rustc_span::{EiiId, ExpnId, ExpnKind, Ident, Span, Symbol, kw, sym};
5252
pub use rustc_type_ir::relate::VarianceDiagInfo;
5353
pub use rustc_type_ir::*;
5454
use tracing::{debug, instrument};
@@ -217,6 +217,9 @@ pub struct ResolverAstLowering {
217217

218218
/// Information about functions signatures for delegation items expansion
219219
pub delegation_fn_sigs: LocalDefIdMap<DelegationFnSig>,
220+
221+
/// Map of defids for all items marked with #[eii(<eii id>)].
222+
pub eii: FxHashMap<EiiId, LocalDefId>,
220223
}
221224

222225
#[derive(Debug)]

compiler/rustc_passes/src/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
457457
}
458458

459459
/// Checks if an `#[inline]` is applied to a function or a closure.
460-
fn check_eii(&self, _hir_id: HirId, attr_span: Span, _defn_span: Span, target: Target) {
460+
fn check_eii(&self, _hir_id: HirId, _attr_span: Span, _defn_span: Span, target: Target) {
461461
match target {
462462
Target::ForeignFn => {}
463463
target => {

compiler/rustc_resolve/src/def_collector.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ impl<'a, 'ra, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'ra, 'tcx> {
138138
&i.attrs,
139139
i.span,
140140
OmitDoc::Skip,
141+
None,
141142
std::convert::identity,
142143
);
143144

compiler/rustc_resolve/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
16891689
lifetime_elision_allowed: self.lifetime_elision_allowed,
16901690
lint_buffer: Steal::new(self.lint_buffer),
16911691
delegation_fn_sigs: self.delegation_fn_sigs,
1692+
eii: self.eii,
16921693
};
16931694
ResolverOutputs { global_ctxt, ast_lowering }
16941695
}

0 commit comments

Comments
 (0)