Add better ICE messages for some undescriptive panics

This commit is contained in:
Ross Smyth 2023-12-14 23:31:36 -05:00
parent 03515c6a22
commit 663bea5a96
3 changed files with 11 additions and 4 deletions

View file

@ -1597,7 +1597,9 @@ impl<'a> State<'a> {
}
match bound {
ast::GenericBound::Outlives(lt) => self.print_lifetime(*lt),
_ => panic!(),
_ => {
panic!("expected a lifetime bound, found a trait bound")
}
}
}
}