diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-29 06:13:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-29 06:13:05 +0200 |
| commit | 5dee519386af4added99455f653545bcc1ea1b43 (patch) | |
| tree | 14f949077b86c60f8f2afad46c41988b065a21b4 /compiler/rustc_const_eval/src | |
| parent | ca1f813cc305ec504d7e49672c340f0d3a597e5a (diff) | |
| parent | d45eb41c500e35bd4ac155b1b49e0920c746abfc (diff) | |
| download | rust-5dee519386af4added99455f653545bcc1ea1b43.tar.gz rust-5dee519386af4added99455f653545bcc1ea1b43.zip | |
Rollup merge of #113773 - compiler-errors:err-layout-bail, r=cjgillot
Don't attempt to compute layout of type referencing error Leads to more ICEs and strange diagnostics than are worth it. Fixes #113760
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/error.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/error.rs b/compiler/rustc_const_eval/src/const_eval/error.rs index ffeff8d079a..d39a7e8a192 100644 --- a/compiler/rustc_const_eval/src/const_eval/error.rs +++ b/compiler/rustc_const_eval/src/const_eval/error.rs @@ -138,7 +138,10 @@ where err_inval!(Layout(LayoutError::Unknown(_))) | err_inval!(TooGeneric) => { ErrorHandled::TooGeneric } - err_inval!(AlreadyReported(error_reported)) => ErrorHandled::Reported(error_reported), + err_inval!(AlreadyReported(guar)) => ErrorHandled::Reported(guar), + err_inval!(Layout(LayoutError::ReferencesError(guar))) => { + ErrorHandled::Reported(guar.into()) + } err_inval!(Layout(layout_error @ LayoutError::SizeOverflow(_))) => { // We must *always* hard error on these, even if the caller wants just a lint. // The `message` makes little sense here, this is a more serious error than the |
