mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Fix stack overflow when derefrencing &!
This commit is contained in:
parent
1b5bba4535
commit
a980b562a7
4 changed files with 30 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue