rust/tests/ui/issues/issue-3424.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
392 B
Rust
Raw Normal View History

//@ check-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
2012-12-07 02:32:13 +00:00
// rustc --test ignores2.rs && ./ignores2
2015-04-10 18:12:43 +00:00
pub struct Path;
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())
});
2012-12-07 02:32:13 +00:00
2015-04-10 18:12:43 +00:00
let path = Path;
assert!(loader(&path).is_ok());
2012-12-07 02:32:13 +00:00
}
pub fn main() {}