Skip to content

Commit 9ba373f

Browse files
deps: bump rustc-ap to v678
1 parent 01f2ead commit 9ba373f

File tree

6 files changed

+57
-65
lines changed

6 files changed

+57
-65
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,36 +66,36 @@ rustc-workspace-hack = "1.0.0"
6666

6767
[dependencies.rustc_ast]
6868
package = "rustc-ap-rustc_ast"
69-
version = "677.0.0"
69+
version = "678.0.0"
7070

7171
[dependencies.rustc_ast_pretty]
7272
package = "rustc-ap-rustc_ast_pretty"
73-
version = "677.0.0"
73+
version = "678.0.0"
7474

7575
[dependencies.rustc_attr]
7676
package = "rustc-ap-rustc_attr"
77-
version = "677.0.0"
77+
version = "678.0.0"
7878

7979
[dependencies.rustc_data_structures]
8080
package = "rustc-ap-rustc_data_structures"
81-
version = "677.0.0"
81+
version = "678.0.0"
8282

8383
[dependencies.rustc_errors]
8484
package = "rustc-ap-rustc_errors"
85-
version = "677.0.0"
85+
version = "678.0.0"
8686

8787
[dependencies.rustc_expand]
8888
package = "rustc-ap-rustc_expand"
89-
version = "677.0.0"
89+
version = "678.0.0"
9090

9191
[dependencies.rustc_parse]
9292
package = "rustc-ap-rustc_parse"
93-
version = "677.0.0"
93+
version = "678.0.0"
9494

9595
[dependencies.rustc_session]
9696
package = "rustc-ap-rustc_session"
97-
version = "677.0.0"
97+
version = "678.0.0"
9898

9999
[dependencies.rustc_span]
100100
package = "rustc-ap-rustc_span"
101-
version = "677.0.0"
101+
version = "678.0.0"

src/attr.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ pub(crate) fn get_span_without_attrs(stmt: &ast::Stmt) -> Span {
4242
ast::StmtKind::Local(ref local) => local.span,
4343
ast::StmtKind::Item(ref item) => item.span,
4444
ast::StmtKind::Expr(ref expr) | ast::StmtKind::Semi(ref expr) => expr.span,
45-
ast::StmtKind::MacCall(ref mac) => {
46-
let (ref mac, _, _) = **mac;
47-
mac.span()
48-
}
45+
ast::StmtKind::MacCall(ref mac_stmt) => mac_stmt.mac.span(),
4946
ast::StmtKind::Empty => stmt.span,
5047
}
5148
}

src/macros.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,7 @@ fn next_space(tok: &TokenKind) -> SpaceState {
11781178
| TokenKind::Pound
11791179
| TokenKind::Dollar
11801180
| TokenKind::OpenDelim(_)
1181-
| TokenKind::CloseDelim(_)
1182-
| TokenKind::Whitespace => SpaceState::Never,
1181+
| TokenKind::CloseDelim(_) => SpaceState::Never,
11831182

11841183
TokenKind::Literal(..) | TokenKind::Ident(..) | TokenKind::Lifetime(_) => SpaceState::Ident,
11851184

@@ -1275,8 +1274,8 @@ impl MacroParser {
12751274
span,
12761275
})) = self.toks.look_ahead(0)
12771276
{
1278-
self.toks.next();
12791277
hi = span.hi();
1278+
self.toks.next();
12801279
}
12811280
Some(MacroBranch {
12821281
span: mk_sp(lo, hi),

src/spanned.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ impl Spanned for ast::Stmt {
6666
ast::StmtKind::Expr(ref expr) | ast::StmtKind::Semi(ref expr) => {
6767
mk_sp(expr.span().lo(), self.span.hi())
6868
}
69-
ast::StmtKind::MacCall(ref mac) => {
70-
let (_, _, ref attrs) = **mac;
71-
if attrs.is_empty() {
69+
ast::StmtKind::MacCall(ref mac_stmt) => {
70+
if mac_stmt.attrs.is_empty() {
7271
self.span
7372
} else {
74-
mk_sp(attrs[0].span.lo(), self.span.hi())
73+
mk_sp(mac_stmt.attrs[0].span.lo(), self.span.hi())
7574
}
7675
}
7776
ast::StmtKind::Empty => self.span,

src/visitor.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,15 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
146146
self.push_rewrite(stmt.span(), rewrite)
147147
}
148148
}
149-
ast::StmtKind::MacCall(ref mac) => {
150-
let (ref mac, _macro_style, ref attrs) = **mac;
151-
if self.visit_attrs(attrs, ast::AttrStyle::Outer) {
149+
ast::StmtKind::MacCall(ref mac_stmt) => {
150+
if self.visit_attrs(&mac_stmt.attrs, ast::AttrStyle::Outer) {
152151
self.push_skipped_with_span(
153-
attrs,
152+
&mac_stmt.attrs,
154153
stmt.span(),
155154
get_span_without_attrs(stmt.as_ast_node()),
156155
);
157156
} else {
158-
self.visit_mac(mac, None, MacroPosition::Statement);
157+
self.visit_mac(&mac_stmt.mac, None, MacroPosition::Statement);
159158
}
160159
self.format_missing(stmt.span().hi());
161160
}

0 commit comments

Comments
 (0)