mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-23 07:29:54 +00:00
isolate the rustc crashing bug in a test
This commit is contained in:
parent
b79fba3e48
commit
a345b06d25
@ -27,7 +27,6 @@ fn main() {
|
||||
p.push(|par| { par.map(print) });
|
||||
p.push(|par| {println!("par: {}", par); par});
|
||||
//p.push(pr);
|
||||
()
|
||||
});
|
||||
|
||||
}
|
||||
|
13
src/nom.rs
13
src/nom.rs
@ -352,3 +352,16 @@ fn file_chain_test() {
|
||||
p.push(|par| par.map(accline).mapf(|v2: &[u8]| str::from_utf8(v2.as_slice())).map(print));
|
||||
});
|
||||
}*/
|
||||
|
||||
/* FIXME: this makes rustc weep
|
||||
fn pr(par: Parser<(),&[u8]>) -> Parser<&[u8], ()> {
|
||||
Error(0)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rustc_panic_test() {
|
||||
FileProducer::new("links.txt", 20).map(|producer: FileProducer| {
|
||||
let mut p = producer;
|
||||
p.push(pr);
|
||||
});
|
||||
}*/
|
||||
|
Loading…
Reference in New Issue
Block a user