Commit Graph

58935 Commits

Author SHA1 Message Date
bors
5509ae399e Auto merge of #37290 - petrochenkov:pnp, r=jseyfried
syntax: Tweak path parsing logic

Associated paths starting with `<<` are parsed in patterns.

Paths like `self::foo::bar` are interpreted as paths and not as `self` arguments in methods (cc @matklad).
Now, I believe, *all* paths are consistently parsed greedily in case of ambiguity.
Detection of `&'a mut self::` requires pretty large (but still fixed) lookahead, so I had to increase the size of parser's lookahead buffer.
Curiously, if `lookahead_distance >= lookahead_buffer_size` was used previously, the parser hung forever, I fixed this as well, now it ICEs.

r? @jseyfried
2016-10-21 06:41:45 -07:00
Ryan Senior
93655863a3 Add an error explaination for E0399 2016-10-21 07:23:41 -05:00
Ryan Senior
e7d01cfe02 Add an error explaination for E0230 2016-10-21 07:23:41 -05:00
Ryan Senior
5402271ceb Add an error explaination for E0182 2016-10-21 07:23:40 -05:00
Ulrik Sverdrup
622f24f6d9 vec: Use Vec::extend specializations in extend_from_slice and more
The new Vec::extend covers the duties of .extend_from_slice() and some
previous specializations.
2016-10-21 14:06:38 +02:00
Nicholas Nethercote
b817cf8b57 Replace the String in ParseResult::Failure with Token.
This lets us delay creation of failure messages until they are needed,
which avoids ~1.6M allocations in html5ever.
2016-10-21 20:27:15 +11:00
bors
da5b6467c3 Auto merge of #37247 - jseyfried:future_proof_no_link, r=nrc
macros: Future proof `#[no_link]`

This PR future proofs `#[no_link]` for macro modularization (cc #35896).

First, we resolve all `#[no_link] extern crate`s. `#[no_link]` crates without `#[macro_use]` or `#[macro_reexport]` are not resolved today, this is a [breaking-change]. For example,
```rust
```
Any breakage can be fixed by simply removing the `#[no_link] extern crate`.

Second, `#[no_link] extern crate`s will define an empty module in type namespace to eventually allow importing the crate's macros with `use`. This is a [breaking-change], for example:
```rust
mod syntax {} //< This becomes a duplicate error.
```

r? @nrc
2016-10-21 01:48:31 -07:00
Devon Hollowood
095850594f Fix test_unwrap_or_default 2016-10-21 00:48:39 -07:00
Devon Hollowood
fb1ef4f42c Make Result's unwrap_or_default unstable 2016-10-20 23:50:33 -07:00
bors
e4708273b5 Auto merge of #37280 - alexcrichton:debuginfo, r=brson
Enable line number debuginfo in releases

This commit enables by default passing the `-C debuginfo=1` argument to the
compiler for the stable, beta, and nightly release channels. A new configure
option was also added, `--enable-debuginfo-lines`, to enable this behavior in
developer builds as well.

Closes #36452
2016-10-20 22:34:29 -07:00
Nicholas Nethercote
e382267cfb Avoid an unnecessary clone in generic_extensions.
This avoids ~800,000 allocations in html5ever.
2016-10-21 12:58:14 +11:00
Nicholas Nethercote
a935481ae9 Avoid an unnecessary clone in macro_parser::parse.
This avoids ~800,000 allocations in html5ever.
2016-10-21 12:58:06 +11:00
bors
041d14b23c Auto merge of #37272 - cuviper:local_stage0-proc_macro, r=alexcrichton
Add libproc_macro from local rust to stage0

This library is now required to run rustc 1.14.0.
2016-10-20 18:33:28 -07:00
Brian Anderson
e47da0c23c Add release notes for 1.12.1 2016-10-20 18:03:08 -07:00
Oliver Middleton
8faa503a6b Fix a few links in the docs 2016-10-21 00:49:47 +01:00
Tshepang Lekhonkhobe
3e26a93a36 doc: a more simple description of Iterator::nth 2016-10-21 00:38:00 +02:00
Tim Neumann
f1356975a4 trans: pad const structs to aligned size 2016-10-20 22:27:06 +02:00
Mikhail Modin
e85277596e improve "Doesn't live long enough" error 2016-10-20 22:51:51 +03:00
Vadim Petrochenkov
fea630ef9d Tweak path parsing logic 2016-10-20 20:28:10 +03:00
Vadim Petrochenkov
65ff4ca294 Refactor parser lookahead buffer and increase its size 2016-10-20 20:28:10 +03:00
Vadim Chugunov
209fe0df24 Fix line stepping in debugger.
Attribute drop code to block's closing brace, instead of the line where the allocation was done.
Attribute function epilogues to function body's closing brace, rather than the function header.
2016-10-20 09:33:04 -07:00
bors
f094206851 Auto merge of #37261 - raphlinus:update_llvm, r=bluss
LLVM: Add triple for Fuchsia

Update subproject commit.

Fixes #36920
2016-10-20 08:18:13 -07:00
Vangelis Katsikaros
cf0fc72a3e TRPL: guessing game: minor clarification 2016-10-20 18:00:12 +03:00
Ulrik Sverdrup
a3cab90fda Document TrustedLen’s contract 2016-10-20 14:44:31 +02:00
Ulrik Sverdrup
69b9400b79 Implement TrustedLen for more iterators 2016-10-20 14:40:09 +02:00
bors
7bccb829d0 Auto merge of #37273 - cuviper:major-minor-rebuild, r=alexcrichton
Detect local-rebuild by just the MAJOR.MINOR version

A new point-release shouldn't change any language semantics, so a local
stage0 that matches MAJOR.MINOR version should still be considered a
local-rebuild as far as `--cfg stageN` features go.

e.g. `1.14.0` should be considered a local-rebuild for any `1.14.X`.

(Bootstrap keys used to be an issue too, until #37265.)
2016-10-20 05:16:49 -07:00
Ulrik Sverdrup
49557112d6 Use TrustedLen for Vec's FromIterator and Extend 2016-10-20 14:07:31 +02:00
Ulrik Sverdrup
9ae9930e2f Introduce iterator trait TrustedLen 2016-10-20 14:07:06 +02:00
Guillaume Gomez
9ec7c655e6 Add missing urls in collections module 2016-10-20 12:34:38 +02:00
Guillaume Gomez
599ad8ed61 Add missing urls on Vec docs 2016-10-20 11:59:47 +02:00
Devon Hollowood
1c2151b7f9 Add unwrap_or_default method to Result 2016-10-19 22:08:49 -07:00
bors
eb38d426c4 Auto merge of #36973 - nnethercote:dep_graph, r=nikomatsakis
Don't enqueue onto a disabled dep_graph.

This commit guards all calls to `DepGraphThreadData::enqueue` with a
check to make sure it is enabled. This avoids some useless allocation
and vector manipulations when it is disabled (i.e. when incremental
compilation is off) which improves speed by 1--2% on most of the
rustc-benchmarks.

This commit has an observable functional change: when the dep_graph is
disabled its `shadow_graph` will no longer receive messages. This should
be ok because these message are only used when debug assertions are
enabled.

r? @nikomatsakis
2016-10-19 22:05:13 -07:00
Nicholas Nethercote
94771a177b Use fast decompression in deflate_bytes.
This commit changes the parameters of `deflate` to do faster,
lower-quality compression. For the compression of LLVM bytecode -- which
is the main use of `deflate_bytes` -- it makes compression almost twice
as fast while the size of the compressed files is only ~2% worse.
2016-10-20 15:08:01 +11:00
John Hodge
ba70ecc414 test - Add missing ! to crate_type/crate_id attributes 2016-10-20 11:29:09 +08:00
Nicholas Nethercote
feefe77125 Remove {in,de}flate_bytes_zlib.
These functions are unused.
2016-10-20 13:56:52 +11:00
bors
dfd98ebd3e Auto merge of #37289 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

- Successful merges: #37165, #37187, #37241, #37283, #37285, #37287, #37288
- Failed merges:
2016-10-19 17:41:49 -07:00
Guillaume Gomez
dd3a014ed9 Rollup merge of #37288 - srinivasreddy:snapshot_map, r=eddyb
run rustfmt on snapshot_map
2016-10-19 23:15:01 +02:00
Guillaume Gomez
655ecd89ed Rollup merge of #37287 - srinivasreddy:unify, r=eddyb
run rustfmt on unify folder
2016-10-19 23:15:01 +02:00
Guillaume Gomez
e7dc035f92 Rollup merge of #37285 - srinivasreddy:cfg, r=nikomatsakis
run rustfmt on control_flow_graph folder
2016-10-19 23:15:01 +02:00
Guillaume Gomez
dfb74ee97b Rollup merge of #37283 - posborne:docs/tests-dir-grammar-fixes, r=steveklabnik
Fix grammatical errors in `tests` directory docs
2016-10-19 23:15:01 +02:00
Guillaume Gomez
123a6ef25c Rollup merge of #37241 - zackmdavis:if_let_over_none_spaced_empty_block_arm, r=nikomatsakis
prefer `if let` to match with `None => { }` arm in some places

In #34268 (8531d581), we replaced matches of None to the unit value `()`
with `if let`s in places where it was deemed that this made the code
unambiguously clearer and more idiomatic. In #34638 (d37edef9), we did
the same for matches of None to the empty block `{}`.

A casual observer, upon seeing these commits fly by, might suppose that
the matter was then settled, that no further pull requests on this
utterly trivial point of style could or would be made. Unless ...

It turns out that sometimes people write the empty block with a space in
between the braces. Who knew?
2016-10-19 23:15:00 +02:00
Guillaume Gomez
ce369bfa11 Rollup merge of #37187 - frewsxcv:cow-doc-example, r=kmcallister
Improve doc example for `std::borrow::Cow`.

None
2016-10-19 23:15:00 +02:00
Guillaume Gomez
32820c149b Rollup merge of #37165 - GuillaumeGomez:bytes_url, r=kmcallister
Add missing urls for io types

r? @steveklabnik
2016-10-19 23:15:00 +02:00
Srinivas Reddy Thatiparthy
4e89811690
run rustfmt on snapshot_map 2016-10-20 00:40:05 +05:30
Srinivas Reddy Thatiparthy
c2d0d4fea6
run rustfmt on unify folder 2016-10-20 00:38:55 +05:30
Srinivas Reddy Thatiparthy
20bda8d5f4
run rustfmt on graph folder 2016-10-20 00:37:24 +05:30
Srinivas Reddy Thatiparthy
f1e4ae17b1
run rustfmt on control_flow_graph folder 2016-10-20 00:25:19 +05:30
Paul Osborne
d79ec7e310 Fix grammatical errors in tests directory docs 2016-10-19 13:39:27 -05:00
Raph Levien
b8697d939a Update llvm-auto-clean-trigger
Update the datestamp so that buildbots do a clean rebuild of llvm.
2016-10-19 10:11:00 -07:00
Raph Levien
8bb76f9241 LLVM: Add triple for Fuchsia
Update subproject commit.
2016-10-19 10:08:30 -07:00