Skip to content

Commit 3c19c4d

Browse files
deps: bump rustc-ap to v678 (#4423)
1 parent aa8e601 commit 3c19c4d

File tree

6 files changed

+59
-69
lines changed

6 files changed

+59
-69
lines changed

Diff for: Cargo.lock

+38-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -107,32 +107,32 @@ lazy_static = "1.0.0"
107107

108108
[dependencies.rustc_ast]
109109
package = "rustc-ap-rustc_ast"
110-
version = "677.0.0"
110+
version = "678.0.0"
111111

112112
[dependencies.rustc_ast_pretty]
113113
package = "rustc-ap-rustc_ast_pretty"
114-
version = "677.0.0"
114+
version = "678.0.0"
115115

116116
[dependencies.rustc_data_structures]
117117
package = "rustc-ap-rustc_data_structures"
118-
version = "677.0.0"
118+
version = "678.0.0"
119119

120120
[dependencies.rustc_errors]
121121
package = "rustc-ap-rustc_errors"
122-
version = "677.0.0"
122+
version = "678.0.0"
123123

124124
[dependencies.rustc_expand]
125125
package = "rustc-ap-rustc_expand"
126-
version = "677.0.0"
126+
version = "678.0.0"
127127

128128
[dependencies.rustc_parse]
129129
package = "rustc-ap-rustc_parse"
130-
version = "677.0.0"
130+
version = "678.0.0"
131131

132132
[dependencies.rustc_session]
133133
package = "rustc-ap-rustc_session"
134-
version = "677.0.0"
134+
version = "678.0.0"
135135

136136
[dependencies.rustc_span]
137137
package = "rustc-ap-rustc_span"
138-
version = "677.0.0"
138+
version = "678.0.0"

Diff for: src/formatting/attr.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ pub(crate) fn get_span_without_attrs(stmt: &ast::Stmt) -> Span {
4646
ast::StmtKind::Local(ref local) => local.span,
4747
ast::StmtKind::Item(ref item) => item.span,
4848
ast::StmtKind::Expr(ref expr) | ast::StmtKind::Semi(ref expr) => expr.span,
49-
ast::StmtKind::MacCall(ref mac) => {
50-
let (ref mac, _, _) = **mac;
51-
mac.span()
52-
}
49+
ast::StmtKind::MacCall(ref mac_stmt) => mac_stmt.mac.span(),
5350
ast::StmtKind::Empty => stmt.span,
5451
}
5552
}

Diff for: src/formatting/macros.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,7 @@ fn next_space(tok: &TokenKind) -> SpaceState {
11811181
| TokenKind::Pound
11821182
| TokenKind::Dollar
11831183
| TokenKind::OpenDelim(_)
1184-
| TokenKind::CloseDelim(_)
1185-
| TokenKind::Whitespace => SpaceState::Never,
1184+
| TokenKind::CloseDelim(_) => SpaceState::Never,
11861185

11871186
TokenKind::Literal(..) | TokenKind::Ident(..) | TokenKind::Lifetime(_) => SpaceState::Ident,
11881187

@@ -1287,11 +1286,11 @@ impl MacroParser {
12871286
}
12881287
};
12891288
if let Some(TokenTree::Token(Token { kind, span })) = self.toks.look_ahead(0) {
1290-
if (is_macro_rules && kind == TokenKind::Semi)
1291-
|| (!is_macro_rules && kind == TokenKind::Comma)
1289+
if (is_macro_rules && *kind == TokenKind::Semi)
1290+
|| (!is_macro_rules && *kind == TokenKind::Comma)
12921291
{
1293-
self.toks.next();
12941292
hi = span.hi();
1293+
self.toks.next();
12951294
}
12961295
}
12971296
Some(MacroBranch {

Diff for: src/formatting/spanned.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ impl Spanned for ast::Stmt {
6969
ast::StmtKind::Expr(ref expr) | ast::StmtKind::Semi(ref expr) => {
7070
mk_sp(expr.span().lo(), self.span.hi())
7171
}
72-
ast::StmtKind::MacCall(ref mac) => {
73-
let (_, _, ref attrs) = **mac;
74-
if attrs.is_empty() {
72+
ast::StmtKind::MacCall(ref mac_stmt) => {
73+
if mac_stmt.attrs.is_empty() {
7574
self.span
7675
} else {
77-
mk_sp(attrs[0].span.lo(), self.span.hi())
76+
mk_sp(mac_stmt.attrs[0].span.lo(), self.span.hi())
7877
}
7978
}
8079
ast::StmtKind::Empty => self.span,

Diff for: src/formatting/visitor.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -163,22 +163,19 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
163163
self.push_rewrite(stmt.span(), rewrite)
164164
}
165165
}
166-
ast::StmtKind::MacCall(ref mac) => {
167-
let (ref mac, _macro_style, ref attrs) = **mac;
168-
if self.visit_attrs(attrs, ast::AttrStyle::Outer) {
166+
ast::StmtKind::MacCall(ref mac_stmt) => {
167+
if self.visit_attrs(&mac_stmt.attrs, ast::AttrStyle::Outer) {
169168
self.push_skipped_with_span(
170-
attrs,
169+
&mac_stmt.attrs,
171170
stmt.span(),
172171
get_span_without_attrs(stmt.as_ast_node()),
173172
);
174173
} else {
175-
self.visit_mac(mac, None, MacroPosition::Statement);
174+
self.visit_mac(&mac_stmt.mac, None, MacroPosition::Statement);
176175
}
177176
self.format_missing(stmt.span().hi());
178177
}
179-
ast::StmtKind::Empty => {
180-
// println!("inside visitor with empty statement");
181-
}
178+
ast::StmtKind::Empty => {}
182179
}
183180
}
184181

0 commit comments

Comments
 (0)