Commit Graph

444 Commits

Author SHA1 Message Date
Eduard Burtescu
ef4352fba6 rustc_metadata: group information into less tags. 2016-09-20 20:08:04 +03:00
Eduard Burtescu
903ec52ba9 rustc: replace uses of NodeId in Def, other than closures and labels. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Patrick Walton
e8a44d29b6 librustc_mir: Remove &*x when x has a reference type.
This introduces a new `InstCombine` pass for us to place such peephole
optimizations.
2016-09-16 09:30:51 -07:00
Ahmed Charles
e10e0bcf2d Use question_mark feature in librustc_mir. 2016-09-11 16:02:43 -07:00
Vadim Petrochenkov
f2b672d556 Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
Simonas Kazlauskas
0520698be3 Count and report time taken by MIR passes 2016-09-06 17:19:36 +03:00
bors
91f057de35 Auto merge of #36203 - petrochenkov:uvsdot, r=nrc
Replace `_, _` with `..` in patterns

This is how https://github.com/rust-lang/rust/issues/33627 looks in action.

Looks especially nice in leftmost/rightmost positions `(first, ..)`/`(.., last)`.
I haven't touched libsyntax intentionally because the feature is still unstable.
2016-09-04 14:03:01 -07:00
Manish Goregaokar
43440a4a6e Rollup merge of #36212 - razielgn:updated-e0493-to-new-format, r=jonathandturner
Updated e0493 to new format (+ bonus).

Part of #35233.
Fixes #35999.

r? @jonathandturner

I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
2016-09-04 21:00:59 +08: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
0cb19389b0 Fix buggy field access translation 2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
957971b63a Implement layout calculation and add more trans stubs 2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
641d8e9e4c Some better support for unions through the compiler 2016-09-03 13:39:34 +03:00
Federico Ravasio
ed5e5df596 E0493: showing a label where the destructor is defined. 2016-09-02 11:44:46 +02:00
Ariel Ben-Yehuda
7b92d05804 turn the RFC1592 warnings into hard errors
The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes #33242
Fixes #33243
2016-09-01 13:34:56 +03:00
Federico Ravasio
638b7c89e6 Updated E0493 to new format. 2016-08-31 18:48:11 +02:00
Jeffrey Seyfried
c14ff2884d Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrc
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28 10:40:04 +00:00
bors
099b9fdb1a Auto merge of #36030 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #35124, #35877, #35953, #36002, #36004, #36005, #36014
- Failed merges:
2016-08-27 03:07:48 -07:00
bors
b7e2157dba Auto merge of #35542 - scottcarr:visitor_refactor, r=nikomatsakis
[MIR] track Location in MirVisitor, combine Location

All the users of MirVisitor::visit_statement implement their own statement index tracking.  This PR move the tracking into MirVisitor itself.

Also, there were 2 separate implementations of Location that were identical.  This PR eliminates one of them.
2016-08-26 19:05:11 -07:00
Eduard Burtescu
7a8d4822d8 rustc: use Vec<Kind> in Substs, where Kind is a &TyS | &Region tagged pointer. 2016-08-27 01:15:07 +03:00
Eduard Burtescu
dffd238f8b rustc: pass ty::Region behind an interned 'tcx reference. 2016-08-27 01:15:06 +03:00
Eduard Burtescu
5222fa58a1 rustc: use accessors for Substs::{types,regions}. 2016-08-27 00:25:04 +03:00
Scott A Carr
c043a27e42 fix port for visit_statement 2016-08-26 15:39:16 -04:00
Jeffrey Seyfried
bfb01bbb26 Refactor away AttrMetaMethods. 2016-08-25 20:41:40 +00:00
Guillaume Gomez
f200061bd6 Add error code test checkup 2016-08-24 11:28:09 +02:00
Jonathan Turner
69612f0039 Rollup merge of #35780 - clementmiao:E0396_new_err_format, r=jonathandturner
updated E0396 to new error format

Updated E0396 to new error format.
Part of #35233
Fixes #35779

Thanks again for letting me help!

r? @jonathandturner
2016-08-20 07:09:35 -07:00
Jonathan Turner
7c843c4663 Rollup merge of #35778 - clementmiao:E0395_new_error_format, r=jonathandturner
updated E0395 to new error format

Updated E0395 to new error format.
Part of #35233
Fixes #35693

Thanks again for letting me help!

r? @jonathandturner
2016-08-20 07:09:34 -07:00
Scott A Carr
0ff128228f track Location in visitor, combine Location 2016-08-18 14:57:42 -04:00
clementmiao
dae1406b82 updated E0396 to new error format 2016-08-17 22:45:21 -07:00
clementmiao
0dc13ee7f2 updated E0395 to new error format 2016-08-17 22:03:52 -07:00
Eduard-Mihai Burtescu
64c1aef5c8 Rollup merge of #35751 - nagisa:mir-scope-fix-again, r=eddyb
Fix the invalidation of the MIR early exit cache

~~The #34307 introduced a cache for early exits in order to help with O(n*m) explosion of cleanup blocks but the cache is invalidated incorrectly and I can’t seem to figure out why (caching is hard!)~~

~~Remove the cache for now to fix the immediate correctness issue and worry about the performance later.~~

Cache invalidation got fixed.

Fixes #35737

r? @nikomatsakis
2016-08-18 06:12:23 +03:00
Simonas Kazlauskas
2c3250adfa Nice graphs 2016-08-18 00:41:56 +03:00
Simonas Kazlauskas
2d366428cc Properly invalidate the early exit cache
Fixes #35737
2016-08-17 21:09:30 +03:00
Jonathan Turner
5fc58dcaff Rollup merge of #35722 - knight42:update-error-msg, r=jonathandturner
Updated E0394 & E0422 to new format

Fixes #35692 and #35700, as part of #35233.

r? @jonathandturner
2016-08-17 06:25:27 -07:00
Eduard Burtescu
9453d9b8ad rustc: remove ParamSpace from Substs. 2016-08-17 06:32:00 +03:00
Eduard Burtescu
4158673ad7 rustc: reduce Substs and Generics to a simple immutable API. 2016-08-17 05:50:57 +03:00
Eduard Burtescu
c87063f07e rustc: avoid using subst::VecPerParamSpace::{empty,new} directly. 2016-08-17 05:50:57 +03:00
Knight
3caa451b9d Updated E0394 to new error message 2016-08-17 03:02:25 +08: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
Guillaume Gomez
844c6e3d5c Add E0394 error explanation 2016-08-15 16:47:17 +02:00
Eduard Burtescu
02aec40dc9 [MIR] Add Storage{Live,Dead} statements to emit llvm.lifetime.{start,end}. 2016-08-14 06:34:14 +03:00
Andrew Cann
54c72d8f98 Minor fix 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
Andrew Cann
f0a8b6d43f Minor fixups based on @eddyb's feedback
Mainly, remove mk_empty() method and replace with tcx.types.empty
2016-08-13 21:37:09 +08:00
Andrew Cann
ed02344fbc Remove obsolete divergence related stuff
Replace FnOutput with Ty
Replace FnConverging(ty) with ty
Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-13 21:37:09 +08:00
Andrew Cann
104963c539 Switch on TyEmpty
Parse -> ! as FnConverging(!)
Add AdjustEmptyToAny coercion to all ! expressions
Some fixes
2016-08-13 21:37:09 +08:00
Andrew Cann
533a389962 Small optimization
Optimiize ExprKind::EmptyToAny expressions applied to function calls.
2016-08-13 21:37:09 +08:00
Andrew Cann
0d863616e0 Add EmptyToAny adjustment 2016-08-13 21:37:09 +08:00
bors
e64f68817d Auto merge of #35348 - scottcarr:discriminant2, r=nikomatsakis
[MIR] Add explicit SetDiscriminant StatementKind for deaggregating enums

cc #35186

To deaggregate enums, we need to be able to explicitly set the discriminant.  This PR implements a new StatementKind that does that.

I think some of the places that have `panics!` now could maybe do something smarter.
2016-08-13 01:20:46 -07:00