We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea73caa commit d6eb4f5Copy full SHA for d6eb4f5
1 file changed
src/constant.rs
@@ -134,11 +134,9 @@ pub(crate) fn codegen_constant<'tcx>(
134
{
135
Ok(const_val) => const_val,
136
Err(_) => {
137
- if promoted.is_none() {
138
- fx.tcx
139
- .sess
140
- .span_err(constant.span, "erroneous constant encountered");
141
- }
+ fx.tcx
+ .sess
+ .span_err(constant.span, "erroneous constant encountered");
142
return crate::trap::trap_unreachable_ret_value(
143
fx,
144
fx.layout_of(const_.ty),
0 commit comments