Commit Graph

94 Commits

Author SHA1 Message Date
Simonas Kazlauskas
1bad5d18b4 Fix MIR unpretty on failure conditions 2016-02-27 12:45:06 +02:00
Jonas Schievink
67aa7b2389 Implement --unpretty mir 2016-02-14 19:23:05 +01:00
Jonas Schievink
2b69c989ee Use more autoderef in rustc_driver 2016-02-12 19:27:20 +01:00
Vadim Petrochenkov
77cc5764b9 Remove some unnecessary indirection from AST structures 2016-02-11 23:33:09 +03:00
Oliver 'ker' Schneider
dfe35da6b8 [breaking-change] don't glob export ast::TraitItemKind variants 2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
019614f03d [breaking-change] don't glob export ast::Item_ variants 2016-02-11 12:34:48 +01:00
Oliver Schneider
80bf9ae18a [breaking-change] don't glob export ast::Expr_ variants 2016-02-11 12:34:48 +01:00
Oliver Schneider
47b0784ba8 [breaking-change] don't glob export ast::BlockCheckMode variants 2016-02-11 12:34:48 +01:00
Niko Matsakis
35b6e2b0bb Instrument a bunch of tasks that employ the HIR map in one way or
another and were not previously instrumented.
2016-02-05 13:19:55 -05:00
Nick Cameron
6bd782c4ca Try to run compiler callbacks when we error out 2016-02-01 08:42:27 +13:00
Nick Cameron
0b511e82ab Initial work towards abort-free compilation
The goal is that the compiler will pass `Result`s around rather than using abort_if_errors. To preserve behaviour we currently abort at the top level. I've removed all other aborts from the driver, but haven't touched any of the nested aborts.
2016-01-26 17:51:11 +13:00
Niko Matsakis
005fa14358 Annotate the compiler with information about what it is doing when. 2016-01-05 21:05:50 -05:00
bors
f41f327f7f Auto merge of #30185 - fhahn:improve-borrowck-public-accessibility, r=pnkfelix
This PR makes `AnalysisData` and`BorrowckCtxt` public. Those types are returned by the public function `build_borrowck_dataflow_data_for_fn` and are needed if a caller wants to pass on the return values.

It also removes `FnPartsWithCFG`, which required callers of  `build_borrowck_dataflow_data_for_fn` to have a reference to a `CFG` with the same lifetime as `FnParts`, which is more limiting than required.
2015-12-05 09:08:14 +00:00
Florian Hahn
b1b40c7ef6 Make public borrowck api more accessible 2015-12-03 18:47:47 +01:00
Marvin Löbel
2a8f358de7 Add syntax support for attributes on expressions and all syntax
nodes in statement position.

Extended #[cfg] folder to allow removal of statements, and
of expressions in optional positions like expression lists and trailing
block expressions.

Extended lint checker to recognize lint levels on expressions and
locals.
2015-11-26 21:46:12 +01:00
Ariel Ben-Yehuda
0a8bb4c509 split the metadata code into rustc_metadata
tests & rustdoc still broken
2015-11-26 18:22:40 +02:00
Ariel Ben-Yehuda
d45dd9423e make CrateStore a trait object
rustdoc still broken
2015-11-26 18:21:17 +02:00
Niko Matsakis
e4ff9f71db Port a bunch of code new-visitor; all of these ports were
straightforward uses of `visit_all_items`. In some cases I had to remove
empty `visit_item` calls that were just to suppress visiting nested
items.
2015-11-18 19:22:18 -05:00
Oliver Schneider
d09220de13 rename ast::ImplItem_::*ImplItem to ast::ImplItemKind::* 2015-11-16 10:35:30 +01:00
Jose Narvaez
4e64645228 Rustfmting librustc_driver. 2015-11-10 20:48:44 +00:00
Niko Matsakis
3c07b46118 Pass the mir map to trans 2015-11-03 04:34:59 -05:00
Niko Matsakis
b48b6eaf75 fix bug in hir,identified 2015-10-22 16:58:08 -04:00
Nick Cameron
401c80dab1 save-analysis: don't recompute crate name 2015-10-21 12:04:48 +13:00
Nick Cameron
a62a529eea review comments 2015-10-09 21:44:44 +13:00
Nick Cameron
2b4f28e531 Misc fixups 2015-10-09 11:53:42 +13:00
Nick Cameron
21205f4f9e Cache ids between lowering runs
So that lowering is reproducible
2015-10-09 11:53:42 +13:00
Nick Cameron
20083c1e1f Move for loop desugaring to lowering 2015-10-09 11:53:41 +13:00
Nick Cameron
56713a1684 Add a lowering context 2015-10-09 11:53:41 +13:00
Vadim Petrochenkov
f284cbc7af Cleanup interfaces of Name, SyntaxContext and Ident
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00
Vadim Petrochenkov
40ce80484c Remove random Idents outside of libsyntax 2015-09-23 20:04:49 +03:00
Nick Cameron
76856e19ff Add an early lint pass for lints that operate on the AST
There is a minor [breaking-change] for lint authors - some functions which were previously defined on `lint::Context` have moved to a trait - `LintContext`, you may need to import that trait to avoid name resolution errors.
2015-09-17 12:16:46 +12:00
Nick Cameron
e9f1b06329 Use ast attributes every where (remove HIR attributes).
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-16 10:57:06 +12:00
Nick Cameron
facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
Felix S. Klock II
e050fc21b9 Rename the unstable option --xpretty to --unpretty
(Inspired by discussion with Gankro.)
2015-07-30 01:33:38 +02:00
Wesley Wiser
93ddee6cee Change some instances of .connect() to .join() 2015-07-10 19:40:46 -04:00
Eduard Burtescu
ad66c215aa rustc: switch most remaining middle::ty functions to methods. 2015-06-26 07:34:57 +03:00
Eduard Burtescu
0b58fdf925 rustc: remove Repr and UserString. 2015-06-19 01:39:26 +03:00
Eduard Burtescu
a3727559c6 rustc: use the TLS type context in Repr and UserString. 2015-06-19 01:32:44 +03:00
Eduard Burtescu
96ad4a4863 rustc: use Repr and UserString instead of ppaux::ty_to_string. 2015-06-19 01:18:43 +03:00
Eduard Burtescu
bc383f6294 rustc: enforce stack discipline on ty::ctxt. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
2e997ef2d4 rustc: remove ownership of tcx from trans' context. 2015-06-19 01:18:42 +03:00
Eduard Burtescu
76eaed44d9 syntax: move ast_map to librustc. 2015-06-10 02:40:45 +03:00
Sean Patrick Santos
7129e8815e Functional changes for associated constants. Cross-crate usage of associated constants is not yet working. 2015-04-23 21:02:26 -06:00
Tamir Duberstein
29ac04402d Positive case of len() -> is_empty()
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Alex Crichton
f92e7abefd rollup merge of #23860: nikomatsakis/copy-requires-clone
Conflicts:
	src/test/compile-fail/coherence-impls-copy.rs
2015-04-01 18:37:54 -07:00
Alex Crichton
e9bacbaa2c rollup merge of #23951: alexcrichton/splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
2015-04-01 13:30:08 -07:00
Alex Crichton
e98dce3e00 std: Changing the meaning of the count to splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
2015-04-01 13:29:42 -07:00
Manish Goregaokar
6a3e8447eb Rollup merge of #23924 - nrc:unqual-assoc3, r=alexcrichton
Basically stuff I did for unqualified assoc types which is worth landing by itself.
2015-04-02 00:40:39 +05:30
Niko Matsakis
d9530c01a7 Fallout out rustc 2015-04-01 11:22:39 -04:00
Nick Cameron
a5479622ea Pretty print ids for assoc items 2015-04-01 12:40:54 +13:00