Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial diagnostic sketch #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Initial diagnostic sketch #1

wants to merge 10 commits into from

Conversation

CAD97
Copy link
Owner

@CAD97 CAD97 commented Oct 10, 2019

No description provided.

@CAD97
Copy link
Owner Author

CAD97 commented Oct 10, 2019

@CAD97
Copy link
Owner Author

CAD97 commented Oct 10, 2019

cc @zbraniecki I'm interested in helping out with wycats/language-reporting#6 / rust-lang/annotate-snippets-rs#11 / rust-lang/annotate-snippets-rs#12 / the merge of [codespan/language-reporting/annotate-snippets], I just got excited and sketched out this LSP-compatible diagnostics API from comparing language-reporting's and annotate-snippets' approaches.

@CAD97
Copy link
Owner Author

CAD97 commented Oct 10, 2019

I guess I should cc @wycats and @brendanzab here as well.

error[E0308]: mismatched types
  rustc_source.txt:51:1
   |
51 |  ) -> Option<String> {
   |      -------------- expected `Option<String>` because of return type
52 | /     for ann in annotations {
53 | \         match (ann.range.0, ann.range.1) {
   | \-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- expected enum `std::option::Option`, found ()
54 |              (None, None) => continue,
55 |              (Some(start), Some(end)) if start > end_index => continue,
56 |              (Some(start), Some(end)) if start >= start_index => {
57 |                  let label = if let Some(ref label) = ann.label {
58 |                      format!(" {}", label)
59 |                  } else {
60 |                      String::from("")
61 |                  };
@CAD97 CAD97 added the invalid Exclude this from Hacktoberfest label Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Exclude this from Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant