Vadim Petrochenkov
3da868dcb6
Make fields of Span
private
2017-08-30 01:38:54 +03:00
Corey Farwell
a4387d54dc
Rollup merge of #43891 - Fourchaux:master, r=steveklabnik
...
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-17 10:44:07 -04:00
Zack M. Davis
1b6c9605e4
use field init shorthand EVERYWHERE
...
Like #43008 (f668999
), but _much more aggressive_.
2017-08-15 15:29:17 -07:00
Fourchaux
c7104be1a3
Fix typos & us spellings
2017-08-15 21:56:30 +02:00
Zack M. Davis
6043ce9f75
make JSON error byte position start at top of file
...
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-21 16:50:44 -07:00
Esteban Küber
697c85a4f1
Only underline suggestion if it is not the only code being shown
2017-07-06 14:36:49 -07:00
Inokentiy Babushkin
a5b8851e22
Added consumption logic for external sources in FileMap
...
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-06-11 13:31:40 +02:00
Mark Simulacrum
4066c8ec71
Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov
...
Fix some clippy warnings in libsyntax
This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-16 17:31:50 -06:00
Andre Bogus
a9c163ebe9
Fix some clippy warnings in libsyntax
...
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12 20:05:39 +02:00
Oliver Schneider
644ce5e535
Address PR reviews
2017-05-11 15:26:22 +02:00
Oliver Schneider
67d762d896
Refactor suggestion diagnostic API to allow for multiple suggestions
2017-05-10 13:20:26 +02:00
bors
33535afda4
Auto merge of #40851 - oli-obk:multisugg, r=jonathandturner
...
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-05-02 01:04:27 +00:00
Michael Woerister
39ffea31df
Implement a file-path remapping feature in support of debuginfo and reproducible builds.
2017-04-26 15:44:02 +02:00
Oliver Schneider
0e920fde4f
Minimize single span suggestions into a note
2017-04-25 11:04:34 +02:00
Jeffrey Seyfried
ec7c0aece1
Merge ExpnId
and SyntaxContext
.
2017-03-29 00:41:10 +00:00
bors
b7ca2b9e14
Auto merge of #38955 - estebank:highlighted-diags, r=nikomatsakis
...
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-20 09:33:10 +00:00
Niko Matsakis
d82d4b66f2
tolerate None
return from get_line
2017-01-17 17:56:03 -05:00
Esteban Küber
fc774e629f
Teach Diagnostics to highlight text
2017-01-17 14:28:53 -08:00
Nick Cameron
e8a4db25ac
Allow supplying an error destination via the compiler driver
...
Allows replacing stderr with a buffer from the client.
Also, some refactoring around run_compiler.
2016-09-28 16:20:30 +13:00
Jonathan Turner
a6e7239e7b
Rename emit_struct->emit
2016-07-14 07:57:46 -04:00
Jonathan Turner
55f06883b8
Remove emit from emitter, leaving emit_struct
2016-07-14 07:57:46 -04:00
Jonathan Turner
6ae3502134
Move errors from libsyntax to its own crate
2016-06-23 08:07:35 -04:00