Skip to content

Commit b1d7e25

Browse files
folkertdevAmanieu
andcommitted
Apply suggestions from code review
Co-authored-by: Amanieu d'Antras <[email protected]>
1 parent 222a054 commit b1d7e25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_hir_analysis/src/check/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
466466
hir::InlineAsmOperand::SymFn { anon_const } => {
467467
debug_assert!(matches!(
468468
self.tcx.type_of(anon_const.def_id).instantiate_identity().kind(),
469-
ty::Error(_) | ty::Never | ty::FnDef(..)
469+
ty::Error(_) | ty::FnDef(..)
470470
));
471471
}
472472
// AST lowering guarantees that SymStatic points to a static.

compiler/rustc_hir_analysis/src/collect/type_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn anon_const_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx> {
6464
let ty = tcx.typeck(def_id).node_type(hir_id);
6565

6666
match ty.kind() {
67-
ty::Never | ty::Error(_) => ty,
67+
ty::Error(_) => ty,
6868
ty::FnDef(..) => ty,
6969
_ => {
7070
tcx.dcx()
@@ -79,7 +79,7 @@ fn anon_const_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx> {
7979
Ty::new_error_with_message(
8080
tcx,
8181
span,
82-
format!("invalid type for `const` operand"),
82+
format!("invalid type for `sym` operand"),
8383
)
8484
}
8585
}

0 commit comments

Comments
 (0)