Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c77b569

Browse files
folkertdevAmanieu
andcommitted
Apply suggestions from code review
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
1 parent 97738e1 commit c77b569

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
@@ -65,7 +65,7 @@ fn anon_const_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx> {
6565
let ty = tcx.typeck(def_id).node_type(hir_id);
6666

6767
match ty.kind() {
68-
ty::Never | ty::Error(_) => ty,
68+
ty::Error(_) => ty,
6969
ty::FnDef(..) => ty,
7070
_ => {
7171
tcx.dcx()
@@ -80,7 +80,7 @@ fn anon_const_type_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx> {
8080
Ty::new_error_with_message(
8181
tcx,
8282
span,
83-
format!("invalid type for `const` operand"),
83+
format!("invalid type for `sym` operand"),
8484
)
8585
}
8686
}

0 commit comments

Comments
 (0)