Auto merge of #121142 - GuillaumeGomez:rollup-5qmksjw, r=GuillaumeGomez

Rollup of 8 pull requests

Successful merges:

 - #120449 (Document requirements for unsized {Rc,Arc}::from_raw)
 - #120505 (Fix BTreeMap's Cursor::remove_{next,prev})
 - #120672 (std::thread update freebsd stack guard handling.)
 - #121088 (Implicitly enable evex512 if avx512 is enabled)
 - #121104 (Ignore unsized types when trying to determine the size of the original type)
 - #121107 (Fix msg for verbose suggestions with confusable capitalization)
 - #121113 (Continue compilation even if inherent impl checks fail)
 - #121120 (Add `ErrorGuaranteed` to `ast::LitKind::Err`, `token::LitKind::Err`.)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-02-15 17:00:55 +00:00
commit cbddf31863
58 changed files with 630 additions and 277 deletions

View file

@ -207,6 +207,13 @@ fn is_cast_to_bigger_memory_layout<'tcx>(
}
let from_layout = cx.layout_of(*inner_start_ty).ok()?;
// if the type isn't sized, we bail out, instead of potentially giving
// the user a meaningless warning.
if from_layout.is_unsized() {
return None;
}
let alloc_layout = cx.layout_of(alloc_ty).ok()?;
let to_layout = cx.layout_of(*inner_end_ty).ok()?;