mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +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() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
//- minicore: fn
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
fn needs_mut(&mut self) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut foo = Foo;
|
||||
|| {
|
||||
fn foo(mut foo: Foo) {
|
||||
let mut call_me = || {
|
||||
let 0 = 1 else { return };
|
||||
foo.needs_mut();
|
||||
};
|
||||
call_me();
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user