Fix stack overflow when derefrencing &!

This commit is contained in:
hkalbasi 2023-03-10 13:44:07 +03:30
parent 1b5bba4535
commit a980b562a7
4 changed files with 30 additions and 2 deletions

View file

@ -336,6 +336,18 @@ fn main() {
);
}
#[test]
fn regression_14310() {
check_diagnostics(
r#"
fn clone(mut i: &!) -> ! {
//^^^^^ 💡 weak: variable does not need to be mutable
*i
}
"#,
);
}
#[test]
fn match_bindings() {
check_diagnostics(