]> git.lizzy.rs Git - rust.git/commitdiff
Fix rustdoc ICE on bad typedef with mismatching types
authorGuillaume Gomez <guillaume.gomez@huawei.com>
Mon, 2 Jan 2023 10:47:36 +0000 (11:47 +0100)
committerGuillaume Gomez <guillaume.gomez@huawei.com>
Mon, 2 Jan 2023 10:47:36 +0000 (11:47 +0100)
src/librustdoc/clean/mod.rs

index 8f4099653562e040b9d753563f9de583fad8fbc5..3253c3ae87c72b9949384fac8effba60916b1e8e 100644 (file)
@@ -1853,7 +1853,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
         ty::Placeholder(..) => panic!("Placeholder"),
         ty::GeneratorWitness(..) => panic!("GeneratorWitness"),
         ty::Infer(..) => panic!("Infer"),
-        ty::Error(_) => panic!("Error"),
+        ty::Error(_) => rustc_errors::FatalError.raise(),
     }
 }