about summary refs log tree commit diff
path: root/src/libsyntax/json.rs
AgeCommit message (Collapse)AuthorLines
2018-04-25Approximate -> ApplicabilityManish Goregaokar-13/+13
2018-04-24Use enum for approximate suggestionsManish Goregaokar-5/+5
2018-03-15Require the code mapper to be thread-safeJohn Kåre Alsaker-2/+2
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-5/+5
2018-02-26Support flag `-Z ui-testing` for tweaking diagnostic output for UI testsVadim Petrochenkov-1/+9
2018-02-01Auto merge of #47540 - Manishearth:suggestion, r=nrcbors-10/+30
Add approximate suggestions for rustfix This adds `span_approximate_suggestion()` that lets you emit a suggestion marked as "non-machine applicable" in the JSON output. UI users see no difference. This is for when rustc and clippy wish to emit suggestions which will make sense to the reader (e.g. they may have placeholders like `<type>`) but are not source-applicable, so that rustfix/etc can ignore these. fixes #39254
2018-01-29Toggle span highlighting on `-Zteach`Esteban Küber-1/+1
2018-01-29Add internal-only rustc_serialize_exclude_null attribute for making the ↵Manish Goregaokar-0/+2
field only exist in the json if the flag is passed
2018-01-29Add -Zapproximate-suggestionsManish Goregaokar-4/+18
2018-01-29Add approximate suggestions for rustfixManish Goregaokar-7/+11
This adds `span_approximate_suggestion()` that lets you emit a suggestion marked as "approximate" in the JSON output. UI users see no difference. This is for when rustc and clippy wish to emit suggestions which will make sense to the reader (e.g. they may have placeholders like `<type>`) but are not source-applicable, so that rustfix/etc can ignore these. fixes #39254
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-1/+1
2017-11-20Address PR commentsOliver Schneider-1/+1
2017-11-20Include rendered diagnostic in jsonOliver Schneider-3/+25
2017-11-16Remove left over dead code from suggestion diagnostic refactoringOliver Schneider-12/+2
2017-11-09Auto merge of #45741 - oli-obk:refactor_suggestions, r=estebankbors-4/+4
Refactor internal suggestion API ~~The only functional change is that whitespace, which is suggested to be added, also gets `^^^^` under it. An example is shown in the tests (the only test that changed).~~ Continuation of #41876 r? @nagisa the changes are probably best viewed [without whitespace](https://github.com/rust-lang/rust/pull/45741/files?w=1)
2017-11-03Refactor internal suggestion APIOliver Schneider-4/+4
2017-11-03Pretty print json in ui testsOliver Schneider-6/+16
2017-11-03Remove outdated documentationOliver Schneider-6/+2
2017-11-02Make the difference between lint codes and error codes explicitOliver Schneider-2/+6
2017-10-24Reduce the repetition in json error outputOliver Schneider-17/+9
2017-08-30Make fields of `Span` privateVadim Petrochenkov-4/+4
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-7/+7
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-07-21make JSON error byte position start at top of fileZack M. Davis-3/+2
The `hi` and `lo` offsets in a span are relative to a `CodeMap`, but this doesn't seem to be terribly useful for tool consumers who don't have the codemap, but might want the byte offset within an actual file? Resolves #35164.
2017-07-06Only underline suggestion if it is not the only code being shownEsteban Küber-1/+1
2017-06-11Added consumption logic for external sources in FileMapInokentiy Babushkin-1/+1
We now fetch source lines from the `external_src` member as a secondary fallback if no regular source is present, that is, if the file map belongs to an external crate and the source has been fetched from disk.
2017-05-16Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkovMark Simulacrum-1/+1
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-1/+1
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-11Address PR reviewsOliver Schneider-5/+5
2017-05-10Refactor suggestion diagnostic API to allow for multiple suggestionsOliver Schneider-35/+33
2017-05-02Auto merge of #40851 - oli-obk:multisugg, r=jonathandturnerbors-2/+12
Minimize single span suggestions into a label changes ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ | help: to access tuple elements, use tuple indexing syntax as shown | println!("☃{}", tup.0); ``` into ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ to access tuple elements, use `tup.0` ``` Also makes suggestions explicit in the backend in preparation of adding multiple suggestions to a single diagnostic. Currently that's already possible, but results in a full help message + modified code snippet per suggestion, and has no rate limit (might show 100+ suggestions).
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-2/+3
reproducible builds.
2017-04-25Minimize single span suggestions into a noteOliver Schneider-2/+12
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-1/+1
2017-01-20Auto merge of #38955 - estebank:highlighted-diags, r=nikomatsakisbors-10/+10
Teach Diagnostics to highlight text Support styled `Diagnostic` output: <img width="469" alt="mismatched types error with colorized types in the note" src="https://cloud.githubusercontent.com/assets/1606434/21871227/93a84198-d815-11e6-88b1-0ede3c7e28ef.png"> Closes #37532 and #38901. r? @nikomatsakis CC @jonathandturner @nagisa @nrc
2017-01-17tolerate `None` return from `get_line`Niko Matsakis-1/+1
2017-01-17Teach Diagnostics to highlight textEsteban Küber-10/+10
2016-09-28Allow supplying an error destination via the compiler driverNick Cameron-3/+13
Allows replacing stderr with a buffer from the client. Also, some refactoring around run_compiler.
2016-07-14Rename emit_struct->emitJonathan Turner-1/+1
2016-07-14Remove emit from emitter, leaving emit_structJonathan Turner-24/+1
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-0/+369