Add an ErrorGuaranteed
to ast::TyKind::Err
.
This makes it more like `hir::TyKind::Err`, and avoids a `span_delayed_bug` call in `LoweringContext::lower_ty_direct`. It also requires adding `ast::TyKind::Dummy`, now that `ast::TyKind::Err` can't be used for that purpose in the absence of an error emission. There are a couple of cases that aren't as neat as I would have liked, marked with `FIXME` comments.
This commit is contained in:
parent
502ce8287b
commit
5233bc91da
14 changed files with 75 additions and 36 deletions
|
@ -1048,11 +1048,16 @@ impl<'a> State<'a> {
|
|||
ast::TyKind::Infer => {
|
||||
self.word("_");
|
||||
}
|
||||
ast::TyKind::Err => {
|
||||
ast::TyKind::Err(_) => {
|
||||
self.popen();
|
||||
self.word("/*ERROR*/");
|
||||
self.pclose();
|
||||
}
|
||||
ast::TyKind::Dummy => {
|
||||
self.popen();
|
||||
self.word("/*DUMMY*/");
|
||||
self.pclose();
|
||||
}
|
||||
ast::TyKind::ImplicitSelf => {
|
||||
self.word("Self");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue