mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
29 lines
439 B
Rust
29 lines
439 B
Rust
use std::error::Error;
|
|
struct A {
|
|
}
|
|
|
|
impl A {
|
|
pub fn new() -> A {
|
|
A {
|
|
}
|
|
}
|
|
|
|
pub fn f<'a>(
|
|
&'a self,
|
|
team_name: &'a str,
|
|
c: &'a mut dyn FnMut(String, String, u64, u64)
|
|
) -> Result<(), Box<dyn Error>> {
|
|
Ok(())
|
|
}
|
|
}
|
|
|
|
|
|
fn main() {
|
|
let A = A::new();
|
|
let participant_name = "A";
|
|
|
|
let c = |a, b, c, d| {};
|
|
|
|
A.f(participant_name, &mut c); //~ ERROR cannot borrow
|
|
}
|