Skip to content

Commit 1e4669e

Browse files
committed
Change check_representability return type to !
1 parent 2c5c655 commit 1e4669e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

compiler/rustc_query_impl/src/from_cycle_error.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc_middle::query::CycleError;
1414
use rustc_middle::query::erase::erase_val;
1515
use rustc_middle::query::plumbing::CyclePlaceholder;
1616
use rustc_middle::ty::layout::{LayoutError, TyAndLayout};
17-
use rustc_middle::ty::{self, Representability, Ty, TyCtxt};
17+
use rustc_middle::ty::{self, Ty, TyCtxt};
1818
use rustc_middle::{bug, span_bug};
1919
use rustc_span::def_id::LocalDefId;
2020
use rustc_span::{ErrorGuaranteed, Span};
@@ -33,9 +33,9 @@ pub(crate) fn specialize_query_vtables<'tcx>(vtables: &mut QueryVTables<'tcx>) {
3333

3434
vtables.fn_sig.value_from_cycle_error = |tcx, cycle, guar| erase_val(fn_sig(tcx, cycle, guar));
3535
vtables.check_representability.value_from_cycle_error =
36-
|tcx, cycle, guar| erase_val(check_representability(tcx, cycle, guar));
36+
|tcx, cycle, guar| check_representability(tcx, cycle, guar);
3737
vtables.check_representability_adt_ty.value_from_cycle_error =
38-
|tcx, cycle, guar| erase_val(check_representability(tcx, cycle, guar));
38+
|tcx, cycle, guar| check_representability(tcx, cycle, guar);
3939
vtables.variances_of.value_from_cycle_error =
4040
|tcx, cycle, guar| erase_val(variances_of(tcx, cycle, guar));
4141
vtables.layout_of.value_from_cycle_error =
@@ -84,7 +84,7 @@ fn check_representability<'tcx>(
8484
tcx: TyCtxt<'tcx>,
8585
cycle_error: CycleError,
8686
_guar: ErrorGuaranteed,
87-
) -> Representability {
87+
) -> ! {
8888
let mut item_and_field_ids = Vec::new();
8989
let mut representable_ids = FxHashSet::default();
9090
for info in &cycle_error.cycle {

0 commit comments

Comments
 (0)