Skip to content

Commit acc682a

Browse files
committed
Change the dummy type used in DummyResult::raw_ty.
`DummyResult::raw_pat` uses a non-error value. And for `raw_ty`, an empty tuple works just as well as an error, and doesn't imply anything about whether errors have been emitted.
1 parent 66c0183 commit acc682a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_expand/src/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,10 @@ impl DummyResult {
567567
}
568568

569569
/// A plain dummy type.
570-
pub fn raw_ty(sp: Span, is_error: bool) -> P<ast::Ty> {
570+
pub fn raw_ty(sp: Span) -> P<ast::Ty> {
571571
P(ast::Ty {
572572
id: ast::DUMMY_NODE_ID,
573-
kind: if is_error { ast::TyKind::Err } else { ast::TyKind::Tup(ThinVec::new()) },
573+
kind: ast::TyKind::Tup(ThinVec::new()),
574574
span: sp,
575575
tokens: None,
576576
})
@@ -611,7 +611,7 @@ impl MacResult for DummyResult {
611611
}
612612

613613
fn make_ty(self: Box<DummyResult>) -> Option<P<ast::Ty>> {
614-
Some(DummyResult::raw_ty(self.span, self.is_error))
614+
Some(DummyResult::raw_ty(self.span))
615615
}
616616

617617
fn make_arms(self: Box<DummyResult>) -> Option<SmallVec<[ast::Arm; 1]>> {

0 commit comments

Comments
 (0)