bobtwinkles
73e0c1e968
Fix review nits
2018-04-26 18:28:34 -04:00
bobtwinkles
263b36b071
Implement parent() on syntax_pos::Span
...
... and reimplement proc_macro::Span::parent using it. This function turns out
to be useful in the compiler as well
2018-04-23 23:59:58 -04:00
Mark Simulacrum
c115cc655c
Move deny(warnings) into rustbuild
...
This permits easier iteration without having to worry about warnings
being denied.
Fixes #49517
2018-04-08 16:59:14 -06:00
bors
8c2d7b2da3
Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakis
...
Bump the bootstrap compiler to 1.26.0 beta
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-07 11:58:38 +00:00
Vadim Petrochenkov
baae274fb7
Use Span
instead of SyntaxContext
in Ident
2018-04-06 11:46:26 +03:00
Alex Crichton
8958815916
Bump the bootstrap compiler to 1.26.0 beta
...
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
2018-04-05 07:13:45 -07:00
Mark Mansi
7ce8191775
Stabilize i128_type
2018-03-26 08:36:50 -05:00
Alex Crichton
4b31b5bda7
Rollup merge of #49030 - Zoxc:misc, r=michaelwoerister
...
Misc changes from my parallel rustc branch
r? @michaelwoerister
2018-03-23 10:16:09 -07:00
John Kåre Alsaker
3fa69c935d
Make Span and Symbol implement Send and Sync
2018-03-17 23:01:46 +01:00
Vadim Petrochenkov
f88162654d
Rename Span::empty
to Span::shrink_to_lo
, add Span::shrink_to_hi
2018-03-17 22:12:21 +03:00
John Kåre Alsaker
426c51d6ea
Make FileMap thread-safe
2018-03-15 00:43:02 +01:00
John Kåre Alsaker
cbdf4ec03e
Remove syntax and syntax_pos thread locals
2018-03-14 11:56:01 +01:00
leonardo.yvens
2e7e68b762
while let all the things
2018-03-05 15:58:54 -03:00
John Kåre Alsaker
b74e97cf42
Replace Rc with Lrc for shared data
2018-03-02 10:48:52 +01:00
Manish Goregaokar
fac7d7cfb2
Rollup merge of #48359 - jsgf:remap-path-prefix, r=sanxiyn
...
Fixes #47311 .
r? @nrc
2018-02-28 15:09:24 -08:00
Jeremy Fitzhardinge
56a6828533
Implement --remap-path-prefix
...
Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.
This is an implementation for issue of #41555 .
2018-02-22 15:13:21 -08:00
Seiichi Uchida
291c51b9c8
Fix up tests and typos
2018-02-18 00:10:40 +09:00
Seiichi Uchida
b5099a708d
Replace dummy spans with empty spans
2018-02-18 00:10:40 +09:00
kennytm
9d995d2832
Rollup merge of #47942 - estebank:macro-spans, r=nikomatsakis Minimize weird spans involving macro context Sometimes the parser attempts to synthesize spans from within a macro context with the span for the captured argument, leading to non-sensical spans with very bad output. Given that an incorrect span is worse than a partially incomplete span, when detecting this situation return only one of the spans without merging them. Fix #32072 , #47778 . CC #23480 .
2018-02-02 22:48:50 +08:00
Esteban Küber
aaec608367
Minimize weird spans involving macro context
...
Sometimes the parser attempts to synthesize spans from within a macro
context with the span for the captured argument, leading to non-sensical
spans with very bad output. Given that an incorrect span is worse than
a partially incomplete span, when detecting this situation return only
one of the spans without mergin them.
2018-02-01 11:51:49 -08:00
David Wood
c71cec8834
end_point handling multibyte characters correctly.
2018-01-27 11:46:27 +00:00
David Wood
c6e6428d1a
Moved overflow check into end_point function.
2018-01-27 11:46:26 +00:00
Michael Woerister
0258c6daca
incr.comp.: Precompute small hash for filenames to save some work.
2017-12-19 15:27:50 +01:00
Michael Woerister
c7e5b703cd
incr.comp.: Revert hashing optimization that caused regression.
2017-12-15 16:50:07 -06:00
Michael Woerister
0b4c2cccac
incr.comp.: Do less hashing per Span.
2017-12-14 10:29:16 -06:00
Oliver Schneider
d732da813b
Use PathBuf instead of String where applicable
2017-12-14 11:22:08 +01:00
bors
5a2465e2b4
Auto merge of #45953 - estebank:tab-4, r=nikomatsakis
...
Display `\t` in diagnostics code as four spaces
Follow up to #44386 using the unicode variable width machinery from #45711 to replace tabs in the source code when displaying a diagnostic error with four spaces (instead of only one), while properly accounting for this when calculating underlines.
Partly addresses #44618 .
2017-12-06 21:05:53 +00:00
Michael Woerister
45439945c9
incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.
...
The previous method ran into problems because ICH would treat Spans
as (file,line,col) but the cache contained byte offsets and its
possible for the latter to change while the former stayed stable.
2017-12-01 13:48:19 +01:00
Esteban Küber
9d80e2200a
Display \t
in diagnostics code as four spaces
2017-11-24 08:24:31 -08:00
Wonwoo Choi
272c2faa1d
Display spans correctly when there are non-half-width characters
2017-11-03 03:15:39 +09:00
Vadim Petrochenkov
06f7f1f68b
Optimize some span operations
...
Decode span data only once
2017-10-29 02:16:53 +03:00
kennytm
23a99f4e0e
Rollup merge of #44775 - MaloJaffre:debug-struct, r=sfackler
...
Refactor to use `debug_struct` in several Debug impls
Also use `pad` and derive `Debug` for `Edge`.
Fixes #44771 .
2017-10-10 22:43:57 +08:00
Malo Jaffré
679457ad2a
Refactor to use debug_struct
in several Debug impls
...
Fixes #44771 .
2017-10-09 20:09:08 +02:00
Philip Craig
3a225c77bb
Rename FileMap::path and change to an Option
2017-10-03 19:47:33 +10:00
Philip Craig
c27a82f193
Don't use remapped path when loading modules and include files
2017-09-30 16:32:45 +10:00
Vadim Petrochenkov
52251cd930
Compress "small" spans to 32 bits and intern "large" spans
2017-09-23 00:34:13 +03:00
Sergio Benitez
5d3626d0f2
Add impl From<Vec<Span>> for MultiSpan
.
2017-09-09 02:09:10 -07:00
Ariel Ben-Yehuda
02b3ae63e2
enable desugaring-sensitive error messages and use them in Try
...
Maybe I should allow error messages to check the *specific* desugaring?
Thanks @huntiep for the idea!
2017-09-03 13:10:54 +03:00
Vadim Petrochenkov
a0c32641fd
Make fields of Span
public again
...
This helps to avoid landing changes to rustc and rustfmt in one step
2017-08-30 01:41:05 +03:00
Vadim Petrochenkov
71dfe6487d
Normalize order of lo
and hi
in Span::new
2017-08-30 01:39:51 +03:00
Vadim Petrochenkov
3da868dcb6
Make fields of Span
private
2017-08-30 01:38:54 +03:00
Tamir Duberstein
b3f50caee0
*: remove crate_{name,type} attributes
...
Fixes #41701 .
2017-08-25 16:18:21 -04:00
bors
4ac7646d39
Auto merge of #43832 - huntiep:compiler-desugaring-enum, r=nikomatsakis
...
Implement CompilerDesugaringKind enum
This is the first step outlined in #35946 . I think that the variants of `CompilerDesugaringKind` should be changed, I didn't know what the official names for `...` and `<-` are.
I'm not to sure how tests for the compiler work, but I would imagine that tests should be added such that
`Symbol::intern(s) == CompilerDesugaringKind::from(s).as_symbol()` for valid `s`.
2017-08-18 00:26:08 +00: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
Hunter Praska
4acfef8f63
Implement CompilerDesugaringKind enum
2017-08-12 19:43:43 -05:00
Eduard-Mihai Burtescu
8a4facc3c3
syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.
2017-08-12 09:14:50 +03:00
Ariel Ben-Yehuda
c9d14a846f
syntax: avoid loading the same source-file multiple times
...
We already had a cache for file contents, but we read the source-file
before testing the cache, causing obvious slowness, so this just avoids
loading the source-file when the cache already has the contents.
2017-08-01 14:18:49 +03:00
Vadim Petrochenkov
128f565dae
Give span to angle bracketed generic arguments
2017-07-27 22:59:35 +03:00
Bruce Mitchener
539df8121b
Fix some doc/comment typos.
2017-07-23 22:48:01 +07:00
Esteban Küber
6772661f37
Review comments
2017-07-21 16:49:09 -07:00