mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: Compute syntax validation errors on demand
This commit is contained in:
parent
4303e741de
commit
c3c9f5ffe1
11 changed files with 45 additions and 44 deletions
|
@ -39,7 +39,7 @@ fn benchmark_parser() {
|
|||
let tree = {
|
||||
let _b = bench("parsing");
|
||||
let p = SourceFile::parse(&data);
|
||||
assert!(p.errors.is_none());
|
||||
assert!(p.errors().is_empty());
|
||||
assert_eq!(p.tree().syntax.text_range().len(), 352474.into());
|
||||
p.tree()
|
||||
};
|
||||
|
@ -57,7 +57,7 @@ fn validation_tests() {
|
|||
dir_tests(&test_data_dir(), &["parser/validation"], "rast", |text, path| {
|
||||
let parse = SourceFile::parse(text);
|
||||
let errors = parse.errors();
|
||||
assert_errors_are_present(errors, path);
|
||||
assert_errors_are_present(&errors, path);
|
||||
parse.debug_dump()
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue