Merge commit '258b15c506' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2023-09-18 12:32:37 +03:00
parent 7e786ea4cf
commit bcfc997eac
195 changed files with 5773 additions and 2750 deletions

View file

@ -163,7 +163,7 @@ fn repr_discr(
return Err(LayoutError::UserError(
"Integer::repr_discr: `#[repr]` hint too small for \
discriminant range of enum "
.to_string(),
.into(),
));
}
return Ok((discr, ity.is_signed()));

View file

@ -212,14 +212,14 @@ fn recursive() {
}
check_fail(
r#"struct Goal(Goal);"#,
LayoutError::UserError("infinite sized recursive type".to_string()),
LayoutError::UserError("infinite sized recursive type".into()),
);
check_fail(
r#"
struct Foo<T>(Foo<T>);
struct Goal(Foo<i32>);
"#,
LayoutError::UserError("infinite sized recursive type".to_string()),
LayoutError::UserError("infinite sized recursive type".into()),
);
}

View file

@ -255,3 +255,17 @@ fn ellipsis_pattern() {
}
}
}
#[test]
fn regression_15623() {
size_and_align_expr! {
let a = 2;
let b = 3;
let c = 5;
move || {
let 0 = a else { return b; };
let y = c;
y
}
}
}