aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-15 15:06:28 +0100
committerGitHub <[email protected]>2020-07-15 15:06:28 +0100
commit57652fc9d439de1315f78fb6aba34e834cb7f727 (patch)
treead2dd0273af40b74b7f9f3ea2b3eb97d409e5bb3
parente0ef6d5c093ceaa64f4e3d3f7a616e0c19f6bef5 (diff)
parent0908318171b78254f72ab3dc3bc6385f8e00ffd8 (diff)
Merge #5395
5395: Show fewer syntax errors r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/ra_ide/src/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs
index 3afe5381a..fe75f4b2c 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>
35 let parse = db.parse(file_id); 35 let parse = db.parse(file_id);
36 let mut res = Vec::new(); 36 let mut res = Vec::new();
37 37
38 // [#34344] Only take first 500 errors to prevent slowing down editor/ide, the number 500 is chosen arbitrarily. 38 // [#34344] Only take first 128 errors to prevent slowing down editor/ide, the number 128 is chosen arbitrarily.
39 res.extend(parse.errors().iter().take(500).map(|err| Diagnostic { 39 res.extend(parse.errors().iter().take(128).map(|err| Diagnostic {
40 range: err.range(), 40 range: err.range(),
41 message: format!("Syntax Error: {}", err), 41 message: format!("Syntax Error: {}", err),
42 severity: Severity::Error, 42 severity: Severity::Error,