Skip to content

Commit 0cc4a8d

Browse files
committed
Update rustc_ap_syntax
1 parent 0f8029f commit 0cc4a8d

File tree

4 files changed

+37
-37
lines changed

4 files changed

+37
-37
lines changed

Cargo.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ env_logger = "0.5"
4646
getopts = "0.2"
4747
derive-new = "0.5"
4848
cargo_metadata = "0.5.1"
49-
rustc-ap-rustc_target = "113.0.0"
50-
rustc-ap-syntax = "113.0.0"
49+
rustc-ap-rustc_target = "121.0.0"
50+
rustc-ap-syntax = "121.0.0"
5151
failure = "0.1.1"
5252

5353
[dev-dependencies]

src/attr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ fn allow_mixed_tactic_for_nested_metaitem_list(list: &[ast::NestedMetaItem]) ->
200200
impl Rewrite for ast::MetaItem {
201201
fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
202202
Some(match self.node {
203-
ast::MetaItemKind::Word => String::from(&*self.ident.name.as_str()),
203+
ast::MetaItemKind::Word => String::from(&*self.name().as_str()),
204204
ast::MetaItemKind::List(ref list) => {
205-
let name = self.ident.name.as_str();
205+
let name = self.name().as_str();
206206
let item_shape = match context.config.indent_style() {
207207
IndentStyle::Block => shape
208208
.block_indent(context.config.tab_spaces())
@@ -260,7 +260,7 @@ impl Rewrite for ast::MetaItem {
260260
}
261261
}
262262
ast::MetaItemKind::NameValue(ref literal) => {
263-
let name = self.ident.name.as_str();
263+
let name = self.name().as_str();
264264
// 3 = ` = `
265265
let lit_shape = shape.shrink_left(name.len() + 3)?;
266266
// `rewrite_literal` returns `None` when `literal` exceeds max

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ pub fn last_line_extendable(s: &str) -> bool {
211211
#[inline]
212212
fn is_skip(meta_item: &MetaItem) -> bool {
213213
match meta_item.node {
214-
MetaItemKind::Word => meta_item.ident.name == SKIP_ANNOTATION,
214+
MetaItemKind::Word => meta_item.name() == SKIP_ANNOTATION,
215215
MetaItemKind::List(ref l) => {
216-
meta_item.ident.name == "cfg_attr" && l.len() == 2 && is_skip_nested(&l[1])
216+
meta_item.name() == "cfg_attr" && l.len() == 2 && is_skip_nested(&l[1])
217217
}
218218
_ => false,
219219
}

0 commit comments

Comments
 (0)