mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-28 00:15:23 +00:00
Handle Ty::Unknown in Chalk conversion
Badly, but at least it doesn't crash.
This commit is contained in:
parent
0ad7317b24
commit
7310f3f801
@ -36,7 +36,11 @@ impl ToChalk for Ty {
|
||||
}
|
||||
Ty::Bound(idx) => chalk_ir::Ty::BoundVar(idx as usize),
|
||||
Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"),
|
||||
Ty::Unknown => unimplemented!(), // TODO turn into placeholder?
|
||||
// FIXME this is clearly incorrect, but probably not too incorrect
|
||||
// and I'm not sure what to actually do with Ty::Unknown
|
||||
Ty::Unknown => {
|
||||
PlaceholderIndex { ui: UniverseIndex::ROOT, idx: 0 }.to_ty()
|
||||
},
|
||||
}
|
||||
}
|
||||
fn from_chalk(db: &impl HirDatabase, chalk: chalk_ir::Ty) -> Self {
|
||||
|
Loading…
Reference in New Issue
Block a user