mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Merge commit '258b15c506
' into sync-from-ra
This commit is contained in:
parent
7e786ea4cf
commit
bcfc997eac
195 changed files with 5773 additions and 2750 deletions
|
@ -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()));
|
||||
|
|
|
@ -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()),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue