2019-11-04 00:00:00 +00:00
|
|
|
//@ check-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 13:02:01 +00:00
|
|
|
#![allow(non_camel_case_types)]
|
2012-12-07 02:32:13 +00:00
|
|
|
// rustc --test ignores2.rs && ./ignores2
|
2013-05-25 02:35:29 +00:00
|
|
|
|
2015-04-10 18:12:43 +00:00
|
|
|
pub struct Path;
|
2014-11-26 13:12:18 +00:00
|
|
|
|
2019-05-28 18:46:13 +00:00
|
|
|
type rsrc_loader = Box<dyn FnMut(&Path) -> Result<String, String>>;
|
2012-12-07 02:32:13 +00:00
|
|
|
|
|
|
|
fn tester()
|
|
|
|
{
|
2015-04-10 18:12:43 +00:00
|
|
|
let mut loader: rsrc_loader = Box::new(move |_path| {
|
|
|
|
Ok("more blah".to_string())
|
2015-02-15 08:52:21 +00:00
|
|
|
});
|
2012-12-07 02:32:13 +00:00
|
|
|
|
2015-04-10 18:12:43 +00:00
|
|
|
let path = Path;
|
2015-01-05 19:07:10 +00:00
|
|
|
assert!(loader(&path).is_ok());
|
2012-12-07 02:32:13 +00:00
|
|
|
}
|
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {}
|