Nick Cameron
a4000cbbf8
Make pretty printer take Session by ref
2016-05-03 10:48:22 +12:00
Tamir Duberstein
728cd03c57
rustc_back: use a common musl base
2016-05-02 17:38:16 -04:00
Patrick Walton
237eb7285e
libcore: Inline mem::forget()
.
...
Was causing severe performance problems in WebRender.
2016-05-02 13:57:53 -07:00
Georg Brandl
4ba6bf44bd
resolve: print location of static for "static in pattern" error
...
The implementation mirrors the one for "constant defined here" annotation
used for constant patterns in the irrefutable-pattern case.
Fixes : #23716
2016-05-02 22:02:07 +02:00
bors
9a003b0ef2
Auto merge of #32386 - brandonedens:llvm_min_size, r=alexcrichton
...
Add CodeGen options to optimize for size.
Add CodeGen options to annotate functions with the attributes OptimizeSize and/or MinSize used by LLVM to reduce .text size.
Closes #32296
2016-05-02 11:27:20 -07:00
Niko Matsakis
9355a91224
assert we get at least two rendered lines back
2016-05-02 13:05:14 -04:00
Alex Crichton
71e63296a2
rustc: Handle concurrent create_dir
requests
...
The compiler created a directory as part of `-Z incremental` but that may be
hierarchically used concurrently so we need to protect ourselves against that.
2016-05-02 09:38:07 -07:00
bors
d80497e628
Auto merge of #33308 - ollie27:wingnu_jemalloc, r=alexcrichton
...
Fix alloc_jemalloc on windows gnu targets
jemalloc prefixes the symbols by default on Windows so we need to account
for that to avoid link errors such as: `undefined reference to 'mallocx'`
when using alloc_jemalloc.
2016-05-02 09:16:23 -07:00
Niko Matsakis
db8a9a92b3
avoid double panic
2016-05-02 11:49:26 -04:00
Niko Matsakis
9d151a71c0
do not fail if len(rendered_lines) is == 1
...
also handle more rendered-lines
2016-05-02 11:49:26 -04:00
jonathandturner
f359aa2762
Fix unicode test to use original error format
2016-05-02 11:49:26 -04:00
Niko Matsakis
64e0819fc2
patch travis failure
2016-05-02 11:49:26 -04:00
Niko Matsakis
95576b8ec4
update unit tests
2016-05-02 11:49:26 -04:00
Niko Matsakis
2ba5fac1a4
fix rebase flaws
2016-05-02 11:49:26 -04:00
Jonathan Turner
5974e5b294
Fix up error-pattern style test
2016-05-02 11:49:26 -04:00
Jonathan Turner
79f61a4532
Finish up with 'old school' error mode
2016-05-02 11:49:25 -04:00
Jonathan Turner
84cb56f8ee
Add back in a 'old school' error format
2016-05-02 11:49:25 -04:00
Niko Matsakis
49dfac4872
move "lint level defined here" into secondary note
...
It does not help you to understand the error, just explains why you are
seeing it, so it is clearly secondary.
2016-05-02 11:49:25 -04:00
Niko Matsakis
89d086be74
change color of warning to YELLOW
2016-05-02 11:49:25 -04:00
Niko Matsakis
790043b44e
fix snippet tests MORE!
2016-05-02 11:49:25 -04:00
Niko Matsakis
8a9ad72c1d
Nit: use Range::contains
2016-05-02 11:49:25 -04:00
Niko Matsakis
ba12ed06ed
fix tests better
2016-05-02 11:49:25 -04:00
Niko Matsakis
5db4d620f2
Nit: remove push_primary_span, which was never called
2016-05-02 11:49:25 -04:00
Niko Matsakis
883b969909
Nit: add comment
2016-05-02 11:49:25 -04:00
Niko Matsakis
1fdbfcdbd0
only emit ^
at the start of a multi-line error
...
as a result, simplify elision code
2016-05-02 11:49:25 -04:00
Niko Matsakis
24f4b151b1
Nit: use last_mut better
2016-05-02 11:49:25 -04:00
Niko Matsakis
94841bea7b
Nit: in emitter.rs
2016-05-02 11:49:25 -04:00
Niko Matsakis
f6496cd370
Nit: address various style nits
2016-05-02 11:49:24 -04:00
Niko Matsakis
d5529f000d
Nit: do not use RLK
2016-05-02 11:49:24 -04:00
Niko Matsakis
d58a4becf3
Nit: do not import variants from Style
2016-05-02 11:49:24 -04:00
Niko Matsakis
e56121c584
Do not import variants from RenderedLineKind
2016-05-02 11:49:24 -04:00
Niko Matsakis
9a9c9afbe2
Fix whitespace
2016-05-02 11:49:24 -04:00
Niko Matsakis
5adfe5bffe
Nit: comments should be uppercase letter
2016-05-02 11:49:24 -04:00
Niko Matsakis
8013eebf2c
fix error message in librustc_driver tests
2016-05-02 11:49:24 -04:00
Niko Matsakis
1067850e6a
refactor the Emitter trait
...
There is now a CoreEmitter that everything desugars to, but without
losing any information. Also remove RenderSpan::FileLine. This lets the
rustc_driver tests build.
2016-05-02 11:49:24 -04:00
Niko Matsakis
9d022f2993
rewrite span-length to include strings
...
It is way easier to copy-and-paste strings from the output
than to figure out how to reproduce them from first
principles.
2016-05-02 11:49:24 -04:00
Niko Matsakis
47143945cc
delete the json-errors test
...
It's primary purpose was to check that json worked at all,
but compiletest does that now.
2016-05-02 11:49:24 -04:00
Niko Matsakis
71c6f81309
change errors from Yellow to Magenta
...
The Yellow text is very hard to read with a white background.
2016-05-02 11:49:24 -04:00
Niko Matsakis
41a652e094
WIP factor out RudimentaryEmitter
2016-05-02 11:49:24 -04:00
Niko Matsakis
489a6c95bf
replace fileline_{help,note} with {help,note}
...
The extra filename and line was mainly there to keep the indentation
relative to the main snippet; now that this doesn't include
filename/line-number as a prefix, it is distracted.
2016-05-02 11:49:23 -04:00
Niko Matsakis
1ff1887cc9
thread tighter span for closures around
...
Track the span corresponding to the `|...|` part of the closure.
2016-05-02 11:47:10 -04:00
Niko Matsakis
e416518e68
update test cases to reflect new messages
2016-05-02 11:47:10 -04:00
Niko Matsakis
d9a947ce8f
use new note_expected_found
API
...
This API pulls the "expected type foo, found type bar" out after the
main snippet. There are some other places where it makes sense, but this
is a start.
2016-05-02 11:47:10 -04:00
Niko Matsakis
11dc974a38
refactor to use new snippet code and model
...
Major changes:
- Remove old snippet rendering code and use the new stuff.
- Introduce `span_label` method to add a label
- Remove EndSpan mode and replace with a fn to get the last
character of a span.
- Stop using `Option<MultiSpan>` and just use an empty `MultiSpan`
- and probably a bunch of other stuff :)
2016-05-02 11:47:10 -04:00
Niko Matsakis
5b150cf0ca
add borrowck info inline in main snippet
...
This uses the new `span_label` APIs
2016-05-02 11:47:10 -04:00
Niko Matsakis
e7c7a18d94
adapt JSON to new model
...
Each Span now carries a `is_primary` boolean along with an optional
label. If there are multiple labels for a span, it will appear multiple
times.
2016-05-02 11:47:10 -04:00
Niko Matsakis
a20ee76b56
revamp MultiSpan and introduce new snippet code
...
MultiSpan model is now:
- set of primary spans
- set of span+label pairs
Primary spans render with `^^^`, secondary spans with `---`.
Labels are placed next to the `^^^` or `---` marker as appropriate.
2016-05-02 11:47:09 -04:00
Ryman
9fe3c065b0
libstd: correct the link to functions in io module documentation
...
Currently the link refers to it's own section of the documentation rather than the list of functions generated by rustdoc.
2016-05-02 15:54:54 +01:00
Oliver Schneider
ce6ea47d43
refactor infer function
...
There was no span available in the cast function, but we need to infer the `x` in `x as char` to `u8`.
The spans are now removed from all functions using `infer` and instead added in `eval_const_expr_partial`
2016-05-02 16:40:40 +02:00
Oliver Schneider
f080b13c6b
tests
2016-05-02 16:38:49 +02:00