Skip to content

Commit 92e4471

Browse files
committed
Note to self
1 parent 1495b6b commit 92e4471

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_mir/const_eval.rs

+3
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ pub fn const_field<'a, 'tcx>(
486486
})();
487487
result.map_err(|error| {
488488
let err = error_to_const_error(&ecx, error);
489+
// FIXME(oli-obk): I believe this is unreachable and we can just ICE here. Since a constant
490+
// is checked for validity before being in a place that could pass it to `const_field`,
491+
// we can't possibly have errors. All fields have already been checked.
489492
err.report_as_error(ecx.tcx, "could not access field of constant");
490493
ErrorHandled::Reported
491494
})

0 commit comments

Comments
 (0)