Commit Graph

123 Commits

Author SHA1 Message Date
Vadim Petrochenkov
f2b672d556 Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
Vadim Petrochenkov
e05e74ac83 Replace _, _ with .. 2016-09-04 12:30:33 +03:00
Vadim Petrochenkov
6f7e51e49b Replace _, _, _ with .. 2016-09-04 12:27:01 +03:00
Vadim Petrochenkov
d9b332bd69 Translate union constants
Fix alignment for packed unions
Add some missing privacy test
Get rid of `unimplemented_unions` macro
2016-09-03 13:39:35 +03:00
Vadim Petrochenkov
641d8e9e4c Some better support for unions through the compiler 2016-09-03 13:39:34 +03:00
Gavin Baker
28c5edb9f6 E0165 Update error format #35270
- Fixes #35270
- Part of #35233

r? @jonathandturner
2016-08-30 09:50:55 +10:00
Eduard Burtescu
dffd238f8b rustc: pass ty::Region behind an interned 'tcx reference. 2016-08-27 01:15:06 +03:00
Eduard-Mihai Burtescu
394c4497de Rollup merge of #35744 - DevShep:ds/update_E0009, r=jonathandturner
Update E0009 to new format

Part of #35233
Fixes #35193

r? @jonathandturner
2016-08-18 06:12:22 +03:00
Jonathan Turner
c216617cf2 Rollup merge of #35731 - pythoneer:fix-35192, r=jonathandturner
Update E0005 to use a label

Fixes #35192 as Part of #35233

r? @jonathandturner
2016-08-17 06:25:28 -07:00
Jacob
7675e4b514 Update E0009 to new format 2016-08-16 22:21:31 -07:00
Eduard Burtescu
4158673ad7 rustc: reduce Substs and Generics to a simple immutable API. 2016-08-17 05:50:57 +03:00
Dustin Bensing
1fc18aab5d Update E0005 to use a label 2016-08-16 23:50:32 +02:00
bors
e25542cb02 Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakis
Implement the `!` type

This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-16 00:12:12 -07:00
Eduard-Mihai Burtescu
50aa568709 Rollup merge of #35644 - garekkream:update-E0302-new-error-format, r=jonathandturner
Update E0302 to the new format

Part of #35233.
Fixes #35523.

r? @jonathandturner
2016-08-14 20:29:52 +03:00
Andrew Cann
a4e6009bf0 Minor fixups based on feedback 2016-08-13 21:37:09 +08:00
Andrew Cann
fadabe08f5 Rename empty/bang to never
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13 21:37:09 +08:00
Krzysztof Garczynski
5402d28fe7 Update E0302 to the new format 2016-08-13 02:33:52 +02:00
Krzysztof Garczynski
302a423047 Update E0301 to the new format 2016-08-13 01:33:42 +02:00
Eduard Burtescu
d1d16c94c5 rustc: rename ProjectionMode and its variant to be more memorable. 2016-08-12 06:43:34 +03:00
Jonathan Turner
d0922f6dc1 Rollup merge of #35532 - KiChjang:e0004-follow-up, r=jonathandturner
Do not span across nodes for E0004

Part of #35233.
Fixes #35529.

r? @arielb1
2016-08-11 06:33:59 -07:00
Jonathan Turner
c7513d79a1 Rollup merge of #35530 - srdja:master, r=jonathandturner
Update E0008 and E0007 to new format

Part of #35233
A fix for #35496

r? @jonathandturner
2016-08-11 06:33:59 -07:00
bors
1f2ae3849c Auto merge of #35525 - jonathandturner:rollup, r=jonathandturner
Rollup of 15 pull requests

- Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524
- Failed merges: #35395, #35415
2016-08-10 10:03:08 -07:00
bors
576f766594 Auto merge of #35401 - jonathandturner:enable_json_and_new_errors, r=jonathandturner
Turn on new errors and json mode

This PR is a big-switch, but on a well-worn path:

* Turns on new errors by default (and removes old skool)
* Moves json output from behind a flag

The RFC for new errors [landed](https://github.com/rust-lang/rfcs/pull/1644) and as part of that we wanted some bake time.  It's now had a few weeks + all the time leading up to the RFC of people banging on it.  We've also had [editors updating to the new format](https://github.com/saviorisdead/RustyCode/pull/159) and expect more to follow.

We also have an [issue on old skool](https://github.com/rust-lang/rust/issues/35330) that needs to be fixed as more errors are switched to the new style, but it seems silly to fix old skool errors when we fully intend to throw the switch in the near future.

This makes it lean towards "why not just throw the switch now, rather than waiting a couple more weeks?"  I only know of vim that wanted to try to parse the new format but were not sure how, and I think we can reach out to them and work out something in the 8 weeks before this would appear in a stable release.

We've [hashed out](https://github.com/rust-lang/rust/issues/35330) stabilizing JSON output, and it seems like people are relatively happy making what we have v1 and then likely adding to it in the future.  The idea is that we'd maintain backward compatibility and just add new fields as needed.  We'll also work on a separate output format that'd be better suited for interactive tools like IDES (since JSON message can get a little long depending on the error).

This PR stabilizes JSON mode, allowing its use without `-Z unstable-options`

Combined, this gives editors two ways to support errors going forward: parsing the new error format or using the JSON mode.  By moving JSON to stable, we can also add support to Cargo, which plugin authors tell us does help simplify their support story.

r? @nikomatsakis
cc @rust-lang/tools

Closes https://github.com/rust-lang/rust/issues/34826
2016-08-09 14:04:54 -07:00
srdja
aa40ec7f11 Update E0007 to new format 2016-08-09 21:23:11 +02:00
bors
e1d2bc2916 Auto merge of #35166 - nikomatsakis:incr-comp-ice-34991-2, r=mw
Address ICEs running w/ incremental compilation and building glium

Fixes for various ICEs I encountered trying to build glium with incremental compilation enabled. Building glium now works. Of the 4 ICEs, I have test cases for 3 of them -- I didn't isolate a test for the last commit and kind of want to go do other things -- most notably, figuring out why incremental isn't saving much *effort*.

But if it seems worthwhile and I can come back and try to narrow down the problem.

r? @michaelwoerister

Fixes #34991
Fixes #32015
2016-08-09 10:00:54 -07:00
Keith Yeung
0a98d73136 Do not span across nodes for E0004 2016-08-08 15:07:14 -07:00
srdja
0cb8439aa3 Update E0008 to new format 2016-08-08 23:36:50 +02:00
Krzysztof Garczynski
daf7c60d16 Update E0162 to the new format 2016-08-08 21:42:49 +02:00
Keith Yeung
06133c50f7 Lengthen the span label to include match and expr for E0004 2016-08-07 22:25:04 -07:00
Jonathan Turner
fad4f32c31 Turn on new errors, json mode. Remove duplicate unicode test 2016-08-07 07:46:49 -07:00
bors
ddf92ffae4 Auto merge of #35393 - GuillaumeGomez:err_codes2, r=jonathandturner
Err codes

r? @jonathandturner
2016-08-06 12:29:28 -07:00
Eduard-Mihai Burtescu
67f082287d Rollup merge of #35380 - TheZoq2:master, r=jonathandturner
Update E0004 to use labels

Fixes #35191 and is part of #35233

"r? @jonathandturner
2016-08-06 15:01:23 +03:00
Eduard-Mihai Burtescu
b722358860 Rollup merge of #35370 - razielgn:updated-e0306-to-new-format, r=jonathandturner
Updated E0306 to new format.

Part of #35233.
Fixes #35315.

r? @jonathandturner
2016-08-06 15:01:22 +03:00
Guillaume Gomez
424e77200d Add error code check in librustc_const_eval/diagnostics.rs 2016-08-05 22:17:41 +02:00
TheZoq2
422e0d590f Update E0004 to use labels 2016-08-05 21:07:34 +02:00
Federico Ravasio
b7468fa189 Updated E0306 to new format. 2016-08-05 16:55:14 +02:00
saml
034e659411 Changing label to "this is an..." 2016-08-04 11:22:02 -04:00
saml
eeda69fcca Set label for unreachable pattern
Part of #35233
Fixes #35190

r? @jonathandturner
2016-08-04 10:42:01 -04:00
Niko Matsakis
94acff1803 replace graph rewriting with detecting inlined ids
We now detect inlined id's earlier (in the HIR map) and rewrite a read
of them to be a read of the metadata for the associated item.
2016-08-02 16:36:09 -04:00
Michael Woerister
d5a5149617 Move caching of HIR-inlining into CStore in order to avoid duplicating inlined HIR. 2016-08-01 04:09:12 -04:00
Michael Woerister
415fde498a intravisit: Fold functionality of IdVisitor into the regular Visitor. 2016-07-29 04:55:31 -04:00
bors
f2e59cc6aa Auto merge of #34907 - arielb1:found-parse-error, r=nikomatsakis
Centralize and clean type error reporting

Refactors the code that handles type errors to be cleaner and fixes various edge cases.

This made the already-bad "type mismatch resolving" error message somewhat uglier. I want to fix that in another commit before this PR is merged.

Fixes #31173

r? @jonathandturner, cc @nikomatsakis
2016-07-27 14:28:06 -07:00
Ariel Ben-Yehuda
717e39294f address review comments
I split the RFC1592 commit out
2016-07-23 00:03:19 +03:00
Ariel Ben-Yehuda
37c569627c refactor constant evaluation error reporting
Refactor constant evaluation to use a single error reporting function
that reports a type-error-like message.

Also, unify all error codes with the "constant evaluation error" message
to just E0080, and similarly for a few other duplicate codes. The old
situation was a total mess, and now that we have *something* we can
further iterate on the UX.
2016-07-22 14:32:56 +03:00
Oliver Schneider
e8ac07941c
improve const eval error reporting on "" and b"" casts 2016-07-22 09:34:44 +02:00
bors
7ad125c4eb Auto merge of #34686 - alexcrichton:new-stage, r=luqmana
rustc: Update stage0 to beta-2016-07-06

Hot off the presses, let's update our stage0 compiler!
2016-07-11 11:29:52 -07:00
Vadim Petrochenkov
9c05fb29d2 Merge PatKind::QPath into PatKind::Path in HIR 2016-07-08 12:42:57 +03:00
Vadim Petrochenkov
49ea3d48a2 Remove unnecessary accessor function VariantDefData::kind 2016-07-08 12:42:57 +03:00
Vadim Petrochenkov
ba419a78f3 Cleanup of some pattern related code 2016-07-08 12:36:45 +03:00
Alex Crichton
0c137ab0a6 rustc: Update stage0 to beta-2016-07-06
Hot off the presses, let's update our stage0 compiler!
2016-07-06 09:29:15 -07:00