Skip to content

Commit

Permalink
Rustfmt, clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Apr 15, 2024
1 parent 7af33b3 commit 9400b99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,11 @@ impl Rewrite for ast::Ty {
rewrite_macro(mac, None, context, shape, MacroPosition::Expression)
}
ast::TyKind::ImplicitSelf => Some(String::from("")),
ast::TyKind::ImplTrait(_, ref it) => {
ast::TyKind::ImplTrait(_, ref it, ref captures) => {
// FIXME(precise_capturing): Implement formatting.
if captures.is_some() {
return None;
}
// Empty trait is not a parser error.
if it.is_empty() {
return Some("impl".to_owned());
Expand Down Expand Up @@ -1106,7 +1110,8 @@ fn join_bounds_inner(

pub(crate) fn opaque_ty(ty: &Option<ptr::P<ast::Ty>>) -> Option<&ast::GenericBounds> {
ty.as_ref().and_then(|t| match &t.kind {
ast::TyKind::ImplTrait(_, bounds) => Some(bounds),
// FIXME(precise_capturing): Implement support here
ast::TyKind::ImplTrait(_, bounds, _) => Some(bounds),
_ => None,
})
}
Expand Down

0 comments on commit 9400b99

Please sign in to comment.