]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/util/ppaux.rs
Fix impl Trait Lifetime Handling
[rust.git] / src / librustc / util / ppaux.rs
index 2e7185cdc0c50038cf583c52d90ea847c08d2eca..4b0cf018cb52495bcbc9d5d8083e9aacb673b393 100644 (file)
@@ -1012,8 +1012,13 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                         Ok(())
                     }
                 }
+                TyForeign(def_id) => parameterized(f, subst::Substs::empty(), def_id, &[]),
                 TyProjection(ref data) => data.print(f, cx),
                 TyAnon(def_id, substs) => {
+                    if cx.is_verbose {
+                        return write!(f, "TyAnon({:?}, {:?})", def_id, substs);
+                    }
+
                     ty::tls::with(|tcx| {
                         // Grab the "TraitA + TraitB" from `impl TraitA + TraitB`,
                         // by looking up the projections associated with the def_id.