Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 367 Bytes
// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616
// Test that `Fn(isize) -> isize + 'static` parses as `(Fn(isize) -> isize) +
// 'static` and not `Fn(isize) -> (isize + 'static)`. The latter would
// cause a compilation error. Issue #18772.
fn adder(y: isize) -> Box<dyn Fn(isize) -> isize + 'static> {
Box::new(move |x| y + x)
}
fn main() {}
You can’t perform that action at this time.