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