diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-07-15 16:05:45 +0200 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2020-07-15 16:06:04 +0200 |
| commit | 0908318171b78254f72ab3dc3bc6385f8e00ffd8 (patch) | |
| tree | 92d0b80f026338080e9e2d1068d7c1dfdc3872bd | |
| parent | 4c08fc9be3f7b79e3040a154aa97c29c97ee5a49 (diff) | |
| download | rust-0908318171b78254f72ab3dc3bc6385f8e00ffd8.tar.gz rust-0908318171b78254f72ab3dc3bc6385f8e00ffd8.zip | |
Show fewer syntax errors
| -rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index 3afe5381a08..fe75f4b2c4d 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs @@ -35,8 +35,8 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> let parse = db.parse(file_id); let mut res = Vec::new(); - // [#34344] Only take first 500 errors to prevent slowing down editor/ide, the number 500 is chosen arbitrarily. - res.extend(parse.errors().iter().take(500).map(|err| Diagnostic { + // [#34344] Only take first 128 errors to prevent slowing down editor/ide, the number 128 is chosen arbitrarily. + res.extend(parse.errors().iter().take(128).map(|err| Diagnostic { range: err.range(), message: format!("Syntax Error: {}", err), severity: Severity::Error, |
