about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-04-04 20:52:56 -0400
committerMichael Goulet <michael@errs.io>2024-04-15 16:45:49 -0400
commit9400b9952ef66554e938477d429eab55deea043b (patch)
treec8f219d1ad191330d0ec544e20a5ca5f61ee3554
parent7af33b30768a7ab0df2b285b225233d5fb565c5c (diff)
downloadrust-9400b9952ef66554e938477d429eab55deea043b.tar.gz
rust-9400b9952ef66554e938477d429eab55deea043b.zip
Rustfmt, clippy
-rw-r--r--src/types.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/types.rs b/src/types.rs
index 10a87f6e698..fe2d28ae1b9 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -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());
@@ -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,
     })
 }