mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
13 lines
219 B
Rust
13 lines
219 B
Rust
//@ check-pass
|
|
pub trait Handler {
|
|
fn handle(&self, _: &mut String);
|
|
}
|
|
|
|
impl<F> Handler for F where F: for<'a, 'b> Fn(&'a mut String) {
|
|
fn handle(&self, st: &mut String) {
|
|
self(st)
|
|
}
|
|
}
|
|
|
|
fn main() {}
|