Commit Graph

247 Commits

Author SHA1 Message Date
Manish Goregaokar 4338bd178d Move epochs to libsyntax 2018-03-08 17:10:03 -08:00
Mark Simulacrum 33f5ceee1f stage0 cfg cleanup 2018-02-20 08:52:33 -07:00
Manish Goregaokar 540f95d9fa Add internal-only rustc_serialize_exclude_null attribute for making the field only exist in the json if the flag is passed 2018-01-29 11:41:03 +05:30
John Kåre Alsaker 9a8d6b8bb5 Do not capture stderr in the compiler. Instead just panic silently for fatal errors 2018-01-26 04:52:30 +01:00
Alex Crichton 8c9bf663d4 rustc: Don't use relative paths for extended errors
These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.
2018-01-04 07:21:22 -08:00
John Kåre Alsaker 70fd306f3c Make mk_attr_id thread safe 2017-12-21 19:21:39 +01:00
Vadim Petrochenkov 70e5c37319 syntax: recovery for incorrect associated item paths like [T; N]::clone 2017-12-17 19:00:50 +03:00
Tamir Duberstein 231d9e7e5d Remove rustc_bitflags; use the bitflags crate 2017-09-17 14:19:24 -04:00
Tamir Duberstein b3f50caee0 *: remove crate_{name,type} attributes
Fixes #41701.
2017-08-25 16:18:21 -04:00
Zack M. Davis 7efeade268 de-orphan extended information
Bizarrely, librustc_passes, librustc_plugin, librustc_mir, and libsyntax
weren't getting their error explanations registered.

Resolves #35284.
2017-08-06 21:29:05 -07:00
Alex Crichton be7ebdd512 Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
Alex Crichton ab54f4b226 rustc: Remove #![unstable] annotation
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-11 16:03:05 -07:00
ubsan 0be875827f fix the easy features in libsyntax 2017-05-07 01:20:15 -07:00
Jeffrey Seyfried ec7c0aece1 Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
Jeffrey Seyfried 1979f96549 Move syntax::ext::hygiene to syntax_pos::hygiene. 2017-03-29 00:41:08 +00:00
Jeffrey Seyfried 68c1cc68b4 Refactor Attribute to use Path and TokenStream instead of MetaItem. 2017-03-14 04:03:43 +00:00
Jeffrey Seyfried d8b34e9a74 Add syntax::ext::tt::quoted::{TokenTree, ..} and remove tokenstream::TokenTree::Sequence. 2017-02-28 22:14:29 +00:00
Josh Driver fbdd038866 Move derive macro expansion into the MacroExpander
This removes the expand_derives function, and sprinkles
the functionality throughout the Invocation Collector,
Expander and Resolver.
2017-02-05 09:31:02 +10:30
Alex Crichton 626e754473 Bump version, upgrade bootstrap
This commit updates the version number to 1.17.0 as we're not on that version of
the nightly compiler, and at the same time this updates src/stage0.txt to
bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-03 13:25:46 -08:00
Jeffrey Seyfried 2dc60b1180 Refactor TokenStream. 2017-01-22 21:37:38 +00:00
Jeffrey Seyfried 191abc4264 Remove unused extern crates. 2017-01-22 01:31:02 +00:00
bors 7ac9d337dc Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrc
Remove not(stage0) from deny(warnings)

Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2017-01-08 08:22:06 +00:00
Simonas Kazlauskas b0e55a83a8 Such large. Very 128. Much bits.
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which
understands and supports 128-bit integers throughout.

The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to
iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported,
this strategy is good enough to get past the first bootstrap stages to end up with a fully working
128-bit capable compiler.

In order for this strategy to work, number of locations had to be changed to use associated
max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?)
had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works
(former not necessarily producing the right results in stage1).

This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30 15:15:44 +01:00
Alex Crichton 9b0b5b45db Remove not(stage0) from deny(warnings)
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2016-12-29 21:07:20 -08:00
bors b4b1e5ece2 Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichton
Rename 'librustc_unicode' crate to 'libstd_unicode'.

Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-12 13:19:33 +00:00
Alex Crichton 2186660b51 Update the bootstrap compiler
Now that we've got a beta build, let's use it!
2016-11-30 10:38:08 -08:00
Corey Farwell 274777a158 Rename 'librustc_unicode' crate to 'libstd_unicode'.
Fixes #26554.
2016-11-30 01:24:01 -05:00
bors b30022a1d3 Auto merge of #37369 - estebank:multiline-span, r=nikomatsakis
Show multiline spans in full if short enough

When dealing with multiline spans that span few lines, show the complete span instead of restricting to the first character of the first line.

For example, instead of:

```
% ./rustc file2.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
  --> file2.rs:13:9
   |
13 |    foo(1 + bar(x,
   |        ^ trait `{integer}: std::ops::Add<()>` not satisfied
   |
```

show

```
% ./rustc file2.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
  --> file2.rs:13:9
   |
13 |      foo(1 + bar(x,
   |  ________^ starting here...
14 | |            y),
   | |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied
   |
```

The [proposal in internals](https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242/6) outlines the reasoning behind this.
2016-11-29 12:53:47 -06:00
Esteban Küber eb53ca3aad Show multiline spans in full if short enough
When dealing with multiline spans that span few lines, show the complete
span instead of restricting to the first character of the first line.

For example, instead of:

```
% ./rustc foo.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
  --> foo.rs:13:9
   |
13 |    foo(1 + bar(x,
   |        ^ trait `{integer}: std::ops::Add<()>` not satisfied
   |
```

show

```
% ./rustc foo.rs
error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied
  --> foo.rs:13:9
   |
13 |      foo(1 + bar(x,
   |  ________^ starting here...
14 | |            y),
   | |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied
   |
```
2016-11-22 13:42:36 -08:00
Jeffrey Seyfried cc74068642 Remove Rc from the interner. 2016-11-21 09:00:56 +00:00
Jeffrey Seyfried d2f8fb0a0a Move syntax::util::interner -> syntax::symbol, cleanup. 2016-11-20 23:40:20 +00:00
Mark-Simulacrum 7bbebb1f54 Change implementation of syntax::util::SmallVector to use data_structures::SmallVec. 2016-11-11 07:38:48 -07:00
Vadim Petrochenkov 74bb594563 Stabilize .. in tuple (struct) patterns 2016-11-03 01:38:15 +03:00
bors e9b2fcb2fe Auto merge of #37373 - nnethercote:html5ever-more-more, r=nrc
Avoid more allocations when compiling html5ever

These three commits reduce the number of allocations performed when compiling html5ever from 13.2M to 10.8M, which speeds up compilation by about 2%.

r? @nrc
2016-10-28 17:02:01 -07:00
Nick Cameron 8c4a39cd95 review changes 2016-10-27 14:44:05 +13:00
Nicholas Nethercote 3fd90d8aa5 Use SmallVector for TtReader::stack.
This avoids 800,000 heap allocations when compiling html5ever. It
requires tweaking `SmallVector` a little.
2016-10-25 11:48:25 +11:00
Nick Cameron 9bc6d26092 Stabilise ?
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-12 08:40:22 +13:00
Eduard Burtescu fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Jeffrey Seyfried d76bf3ed80 Strip unconfigured nodes in the InvocationCollector fold. 2016-09-07 22:41:35 +00:00
Jeffrey Seyfried c07ff8d26a Add module ext::placeholders with placeholder() and PlaceholderExpander. 2016-09-05 04:53:33 +00:00
Eduard Burtescu 119508cdb4 Remove drop flags from structs and enums implementing Drop. 2016-08-24 13:23:37 +03:00
cgswords 98c8e0a05d Proc_macro is alive 2016-08-16 13:17:36 -07:00
Jeffrey Seyfried 44575f708a Rename mtwt to hygiene 2016-07-17 17:12:35 +00:00
Guillaume Gomez 84e874f0e0 Add comments on error code list 2016-06-30 11:14:22 +02:00
ggomez 0e326d4780 Add error codes in libsyntax 2016-06-29 13:28:49 +02:00
Jeffrey Seyfried 8eddf02800 Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,Manishearth
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-26 02:18:43 +00:00
Jeffrey Seyfried 82a15a6a0a Rollup merge of #34385 - cgswords:tstream, r=nrc
syntax-[breaking-change] cc #31645
(Only breaking because ast::TokenTree is now tokenstream::TokenTree.)

This pull request refactors TokenTrees into their own file as src/libsyntax/tokenstream.rs, moving them out of src/libsyntax/ast.rs, in order to prepare for an accompanying TokenStream implementation (per RFC 1566).
2016-06-26 02:11:59 +00:00
Jonathan Turner bc1400600b reexport errors from syntax. fix failing cfail test 2016-06-24 19:10:15 -04:00
Jonathan Turner 6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
cgswords d59accfb06 Refactored tokentrees into their own files in preparation for tokenstreams. Modified tests to point to the new file now. 2016-06-21 11:12:36 -07:00