diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-11 19:21:33 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-11 19:40:03 -0400 |
| commit | f15997ffeca4c7da66e7de9e348ccb8d3cccc946 (patch) | |
| tree | 2662511eb64f7bb5fab35bb545e6bc1448c696c0 /compiler/rustc_ty_utils/src | |
| parent | b5d2079fb9c9ac9f0fe594f65452b4097e71c2de (diff) | |
| download | rust-f15997ffeca4c7da66e7de9e348ccb8d3cccc946.tar.gz rust-f15997ffeca4c7da66e7de9e348ccb8d3cccc946.zip | |
Remove struct_tail_no_normalization
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index 1eb03fc3bd6..244a6afcf97 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -219,9 +219,13 @@ fn layout_of_uncached<'tcx>( // its struct tail cannot be normalized either, so try to get a // more descriptive layout error here, which will lead to less confusing // diagnostics. + // + // We use the raw struct tail function here to get the first tail + // that is an alias, which is likely the cause of the normalization + // error. match tcx.try_normalize_erasing_regions( param_env, - tcx.struct_tail_without_normalization(pointee), + tcx.struct_tail_raw(pointee, |ty| ty, || {}), ) { Ok(_) => {} Err(better_err) => { |
