rust-analyzer/crates/syntax/fuzz/fuzz_targets/parser.rs

12 lines
232 B
Rust
Raw Normal View History

2021-05-22 13:53:47 +00:00
//! Fuzzing for from-scratch parsing.
#![no_main]
2019-03-21 17:05:12 +00:00
use libfuzzer_sys::fuzz_target;
2020-08-12 16:26:51 +00:00
use syntax::fuzz::check_parser;
fuzz_target!(|data: &[u8]| {
if let Ok(text) = std::str::from_utf8(data) {
2019-03-21 17:05:12 +00:00
check_parser(text)
}
});