Skip to content

Commit d45eb41

Browse files
committedJul 27, 2023
Dont report CTFE errors that are due to references-error layouts
1 parent 77fa702 commit d45eb41

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_const_eval/src/const_eval

1 file changed

+4
-1
lines changed
 

‎compiler/rustc_const_eval/src/const_eval/error.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ where
138138
err_inval!(Layout(LayoutError::Unknown(_))) | err_inval!(TooGeneric) => {
139139
ErrorHandled::TooGeneric
140140
}
141-
err_inval!(AlreadyReported(error_reported)) => ErrorHandled::Reported(error_reported),
141+
err_inval!(AlreadyReported(guar)) => ErrorHandled::Reported(guar),
142+
err_inval!(Layout(LayoutError::ReferencesError(guar))) => {
143+
ErrorHandled::Reported(guar.into())
144+
}
142145
err_inval!(Layout(layout_error @ LayoutError::SizeOverflow(_))) => {
143146
// We must *always* hard error on these, even if the caller wants just a lint.
144147
// The `message` makes little sense here, this is a more serious error than the

0 commit comments

Comments
 (0)
Please sign in to comment.