-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
examples/rustc output as of 2973c1d: https://gist.github.com/CAD97/782504aa225f865c5b0ad3efcd54f08f |
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. |
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 | };
No description provided.