Commit Graph

74520 Commits

Author SHA1 Message Date
Tobias Bucher
6c86da288a Make wording around 0-cost casts more precise 2018-01-27 17:54:01 +01:00
varkor
a21b7b3b16 Improve formatting of else block 2018-01-27 15:16:42 +00:00
Pramod Bisht
7f6a53e746 Changed color of struct link from #ff794d to #2dbfb8 2018-01-27 20:00:59 +05:30
David Wood
f92d679b78
Encompassed error deduplication of some existing sets in the ctxt. 2018-01-27 13:33:10 +00:00
David Wood
3daa4d255f
Introduced a new set to stop duplicate errors from MIR passes on one place/span. 2018-01-27 13:33:10 +00:00
David Wood
f1c1db61e4
Updated other affected tests. 2018-01-27 13:33:10 +00:00
David Wood
dd6b005926
Added test for #45697 2018-01-27 13:33:09 +00:00
David Wood
0bd96671f0
Fixed infinite loop issues and added some improved logging. 2018-01-27 13:30:34 +00:00
David Wood
0c467d5d09
Now handling case where span has same lo and hi. 2018-01-27 11:46:29 +00:00
David Wood
71b7500241
Fix new test from rebase. 2018-01-27 11:46:28 +00:00
David Wood
be465b0b85
next_point now handles creating spans over multibyte characters. 2018-01-27 11:46:28 +00:00
David Wood
62356471b3
Replaced multi-byte character handling in end_point with potentially more performant variant. 2018-01-27 11:46:28 +00: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
David Wood
f6fee2a479
Fixed off-by-one spans in MIR borrowck errors. 2018-01-27 11:46:26 +00:00
David Wood
6d00c9686b
Updated tests with fixed span location. 2018-01-27 11:46:22 +00:00
bors
6b99adeb11 Auto merge of #46450 - Gilnaa:libtest_json_output, r=nrc
Libtest json output

A revisit to my [last PR](https://github.com/rust-lang/rust/pull/45923).

Events are now more atomic, printed in a flat hierarchy.

For the normal test output:
```
running 1 test
test f ... FAILED

failures:

---- f stdout ----
	thread 'f' panicked at 'assertion failed: `(left == right)`
  left: `3`,
 right: `4`', f.rs:3:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.

failures:
    f

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
```

The JSON equivalent is:
```
{ "type": "suite", "event": "started", "test_count": "1" }
{ "type": "test", "event": "started", "name": "f" }
{ "type": "test", "event": "failed", "name": "f" }
{ "type": "suite", "event": "failed", "passed": 0, "failed": 1, "allowed_fail": 0, "ignored": 0,  "measured": 0, "filtered_out": "0" }
{ "type": "test_output", "name": "f", "output": "thread 'f' panicked at 'assertion failed: `(left == right)`
  left: `3`,
 right: `4`', f.rs:3:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.
" }
```
2018-01-27 10:56:56 +00:00
Gilad Naaman
8b7f1d0cec libtest: Fixed call to python in run-make 2018-01-27 11:50:01 +02:00
bors
6272b60dca Auto merge of #47690 - estebank:for-block-277, r=nikomatsakis
For E0277 on `for` loops, point at the "head" expression

When E0277's span points at a `for` loop, the actual issue is in the
element being iterated. Instead of pointing at the entire loop, point
only at the first line (when possible) so that the span ends in the
element for which E0277 was triggered.
2018-01-27 08:04:12 +00:00
Pulkit Goyal
5ce2b02997 don't mention tasks in stability warnings of #[thread_local] #47755
This is a fix for issue #47755.
2018-01-27 13:28:09 +05:30
Ryan Cumming
ed7e4e1e27 Expand union test to include different types 2018-01-27 14:26:14 +11:00
Araam Borhanian
0984ee3051 Adding ICH to the glossary. 2018-01-26 21:10:35 -05:00
Ryan Cumming
75c79bdb02 Fix ICE on const eval of union field
MIR's `Const::get_field()` attempts to retrieve the value for a given
field in a constant. In the case of a union constant it was falling
through to a generic `const_get_elt` based on the field index. As union
fields don't have an index this caused an ICE in `llvm_field_index`.

Fix by simply returning the current value when accessing any field in a
union. This works because all union fields start at byte offset 0.

The added test uses `const_fn` it ensure the field is extracted using
MIR's const evaluation. The crash is reproducible without it, however.

Fixes #47788
2018-01-27 12:57:01 +11:00
Niko Matsakis
205eba83e2
pacify the mercilous tidy 2018-01-26 20:51:40 -05:00
Niko Matsakis
b57ca9d97f
change from dirty_bit_vec to clean_bit_vec
Otherwise the vector is initially out of sync
2018-01-26 20:13:51 -05:00
Niko Matsakis
44b666816b
Adjust comment spacing
I suspect the lines would be long for tidy.
2018-01-26 19:58:54 -05:00
Santiago Pastorino
da545cee60 Make region inference use a dirty list
Fixes #47602
2018-01-26 21:56:49 -03:00
Esteban Küber
ee06559576 Tweak presentation on lifetime trait mismatch 2018-01-26 16:38:07 -08:00
bors
5c41fcec4c Auto merge of #47571 - FenrirWolf:libunwind, r=alexcrichton
Match libunwind's EABI selection with libpanic_unwind

Currently, the `libunwind` crate will only select the ARM EABI if it is compiling for ARM/Linux or Android targets. `libpanic_unwind`, however, will choose the ARM EABI if the target arch is ARM and the OS is not iOS. This means that if one tries to enable unwinding for a non-standard ARM target (such as implementing a custom stdlib via Xargo, for example), then the two crates can potentially disagree about which EABI is being targeted.

This PR makes `libunwind` use the [same logic](https://github.com/rust-lang/rust/blob/master/src/libpanic_unwind/gcc.rs#L139-L146) as `libpanic_unwind` when choosing the EABI.

I noticed there are a few comments about certain functions only differing on Android or ARM/Linux, but I *think* that those differences apply to the ARM EABI in general. Let me know if I'm wrong about that.
2018-01-27 00:28:34 +00:00
tinaun
838ddbf908
derive PartialEq and Eq for ParseCharError
unlike the other Parse*Error types, ParseCharError didn't have these implemented for whatever reason
2018-01-26 18:52:27 -05:00
Esteban Küber
445e404ba4 Instead of modifying the item's span synthesize it 2018-01-26 15:06:09 -08:00
Esteban Küber
fa7767e1ea review comment 2018-01-26 14:24:17 -08:00
Esteban Küber
d0bd090efb Consider all whitespace when preparing span 2018-01-26 14:24:17 -08:00
Esteban Küber
a8f77e12fc Include space in suggestion mut in bindings 2018-01-26 14:24:17 -08:00
Mark Mansi
e2d558ad56 A few more comments 2018-01-26 14:47:24 -06:00
Mark Mansi
02d1d92878 Still more comments 2018-01-26 14:47:24 -06:00
Mark Mansi
b01b481db3 Added/improved comments 2018-01-26 14:47:24 -06:00
Mark Mansi
6d4ed65585 Added lots of comments + minor reorganization 2018-01-26 14:47:24 -06:00
Mark Mansi
0d7f193dd3 Added a bunch of comments to macro_parser.rs 2018-01-26 14:47:24 -06:00
Mark Mansi
ac0c16d3b5 Run rustfmt on /libsyntax/ext/tt/macro_parser.rs 2018-01-26 14:47:24 -06:00
Esteban Küber
106e5c554d Don't add "in this macro invocation" label to desugared spans 2018-01-26 11:35:27 -08:00
Esteban Küber
f90c445637 Modify spans of expanded expression
Modify the spans used for `for`-loop expression expansion, instead of
creating a new span during error creation.
2018-01-26 11:05:02 -08:00
Gilad Naaman
100ead353a Updated Cargo commit hash 2018-01-26 19:57:02 +02:00
Gilad Naaman
cb86f38497 libtest: Failing benchmarks no longer crash the harness. 2018-01-26 19:46:04 +02:00
Gilad Naaman
360b26389c libtest: Split-up formatters.rs into smaller modules
libtest: Split HumanFormatter into {Pretty,Terse}

libtest: Fixed padding of benchmarks when not benchmarking

libtest: Fixed benchmarks' names not showing in terse-mode

libtest: Formatting
2018-01-26 19:46:04 +02:00
Gilad Naaman
adddb0f41a libtest: Added UI tests for --format=json
libtest: Remove usage of jq

libtest: Fixed UI tests

- Now comparing to the right file.
- A python script checks for validity of JSON documents
2018-01-26 19:46:04 +02:00
Gilad Naaman
8b3fd98f4c libtest: rustfmt run
libtest: Whoops
2018-01-26 19:46:04 +02:00
Gilad Naaman
94bd1216bb libtest: Fixed pretty-printing of test names in single-threaded code. 2018-01-26 19:46:04 +02:00
Gilad Naaman
e570e9e79a libtest: JSON formatting is now only available in unstable builds
libtest: Added the -Z option for unstable options
2018-01-26 19:46:04 +02:00
Gilad Naaman
588a6a35be Added JSON output to libtest.
libtest: Json format now outputs failed tests' stdouts.

libtest: Json format now outputs failed tests' stdouts.

libtest: Json formatter now spews individiual events, not as an array

libtest: JSON fixes

libtest: Better JSON escaping

libtest: Test start event is printed on time
2018-01-26 19:46:04 +02:00