1
Fork 0

make mk_attr_id part of ParseSess

This commit is contained in:
SparrowLii 2022-09-02 16:29:40 +08:00
parent 17cbdfd071
commit 1a3ecbdb6a
13 changed files with 88 additions and 27 deletions

View file

@ -424,7 +424,13 @@ impl<'a> StripUnconfigured<'a> {
);
trees.push(bracket_group);
let tokens = Some(LazyAttrTokenStream::new(AttrTokenStream::new(trees)));
let attr = attr::mk_attr_from_item(item, tokens, attr.style, item_span);
let attr = attr::mk_attr_from_item(
&self.sess.parse_sess.attr_id_generator,
item,
tokens,
attr.style,
item_span,
);
if attr.has_name(sym::crate_type) {
self.sess.parse_sess.buffer_lint(
rustc_lint_defs::builtin::DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,