mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
use code from bug report for regression test
This commit is contained in:
parent
a0c31b73d8
commit
b3aba94cbd
@ -1178,18 +1178,20 @@ fn f() {
|
|||||||
fn regression_15623() {
|
fn regression_15623() {
|
||||||
check_diagnostics(
|
check_diagnostics(
|
||||||
r#"
|
r#"
|
||||||
|
//- minicore: fn
|
||||||
|
|
||||||
struct Foo;
|
struct Foo;
|
||||||
|
|
||||||
impl Foo {
|
impl Foo {
|
||||||
fn needs_mut(&mut self) {}
|
fn needs_mut(&mut self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn foo(mut foo: Foo) {
|
||||||
let mut foo = Foo;
|
let mut call_me = || {
|
||||||
|| {
|
|
||||||
let 0 = 1 else { return };
|
let 0 = 1 else { return };
|
||||||
foo.needs_mut();
|
foo.needs_mut();
|
||||||
};
|
};
|
||||||
|
call_me();
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user