Merge remote-tracking branch 'upstream/master' into rustup

This commit is contained in:
Philipp Krones 2023-05-05 17:23:10 +02:00
commit 88c7632659
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5
160 changed files with 2212 additions and 434 deletions

View file

@ -60,7 +60,7 @@ fn is_struct_with_trailing_zero_sized_array(cx: &LateContext<'_>, item: &Item<'_
if let Some(last_field) = data.fields().last();
if let rustc_hir::TyKind::Array(_, rustc_hir::ArrayLen::Body(length)) = last_field.ty.kind;
// Then check if that that array zero-sized
// Then check if that array is zero-sized
let length = Const::from_anon_const(cx.tcx, length.def_id);
let length = length.try_eval_target_usize(cx.tcx, cx.param_env);
if let Some(length) = length;