Skip to content

Commit f0de5b4

Browse files
authored
bump rustc-ap-* to v666 (#4274)
2 parents 0c337c2 + 0fc02ac commit f0de5b4

File tree

5 files changed

+59
-59
lines changed

5 files changed

+59
-59
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 8 additions & 8 deletions
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 = "664.0.0"
110+
version = "666.0.0"
111111

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

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

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

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

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

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

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

src/formatting/chains.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl ChainItemKind {
147147

148148
fn from_ast(context: &RewriteContext<'_>, expr: &ast::Expr) -> (ChainItemKind, Span) {
149149
let (kind, span) = match expr.kind {
150-
ast::ExprKind::MethodCall(ref segment, ref expressions) => {
150+
ast::ExprKind::MethodCall(ref segment, ref expressions, _) => {
151151
let types = if let Some(ref generic_args) = segment.args {
152152
if let ast::GenericArgs::AngleBracketed(ref data) = **generic_args {
153153
data.args
@@ -394,7 +394,7 @@ impl Chain {
394394
// is a try! macro, we'll convert it to shorthand when the option is set.
395395
fn pop_expr_chain(expr: &ast::Expr, context: &RewriteContext<'_>) -> Option<ast::Expr> {
396396
match expr.kind {
397-
ast::ExprKind::MethodCall(_, ref expressions) => {
397+
ast::ExprKind::MethodCall(_, ref expressions, _) => {
398398
Some(Self::convert_try(&expressions[0], context))
399399
}
400400
ast::ExprKind::Field(ref subexpr, _)

src/formatting/items.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -657,17 +657,16 @@ impl<'a> FmtVisitor<'a> {
657657
}
658658

659659
fn is_type(ty: &Option<rustc_ast::ptr::P<ast::Ty>>) -> bool {
660-
match ty {
661-
None => true,
662-
Some(lty) => lty.kind.opaque_top_hack().is_none(),
660+
if let Some(lty) = ty {
661+
if let ast::TyKind::ImplTrait(..) = lty.kind {
662+
return false;
663+
}
663664
}
665+
true
664666
}
665667

666668
fn is_opaque(ty: &Option<rustc_ast::ptr::P<ast::Ty>>) -> bool {
667-
match ty {
668-
None => false,
669-
Some(lty) => lty.kind.opaque_top_hack().is_some(),
670-
}
669+
!is_type(ty)
671670
}
672671

673672
fn both_type(

src/formatting/visitor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,15 +687,15 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
687687
};
688688
let rewrite = match ty {
689689
None => rewrite_associated(),
690-
Some(ty) => match ty.kind.opaque_top_hack() {
691-
Some(generic_bounds) => rewrite_opaque_impl_type(
690+
Some(ty) => match ty.kind {
691+
ast::TyKind::ImplTrait(_, ref bounds) => rewrite_opaque_impl_type(
692692
&self.get_context(),
693693
ii.ident,
694694
generics,
695-
generic_bounds,
695+
bounds,
696696
self.block_indent,
697697
),
698-
None => rewrite_associated(),
698+
_ => rewrite_associated(),
699699
},
700700
};
701701
self.push_rewrite(ii.span, rewrite);

0 commit comments

Comments
 (0)