Commit Graph

58169 Commits

Author SHA1 Message Date
Guillaume Gomez
38337c2159 Rollup merge of #37253 - srinivasreddy:liballoc, r=nrc
Apply rustfmt on liballoc folder
2016-10-22 01:21:59 +02:00
Guillaume Gomez
0dee00f545 Rollup merge of #37244 - senior:add-error-desc-182-230-399, r=GuillaumeGomez
Add error explaination for E0182, E0230 and E0399

This PR adds some error descriptions requested in issue https://github.com/rust-lang/rust/issues/32777.

r? @GuillaumeGomez

Specifically this adds descriptions for

E0182 - unexpected binding of associated item in expression path
E0230 - missing type parameter from on_unimplemented description
E0399 - overriding a trait type without re-implementing default methods
2016-10-22 01:21:59 +02:00
Guillaume Gomez
8133a55e05 Rollup merge of #37219 - srinivasreddy:prelude, r=nrc
Run rustfmt on libcore/prelude folder
2016-10-22 01:21:59 +02:00
Guillaume Gomez
686ff0c169 Rollup merge of #37211 - srinivasreddy:alt, r=nrc
run rustfmt on various folders
2016-10-22 01:21:58 +02:00
Guillaume Gomez
88d1cbdbab Rollup merge of #37209 - srinivasreddy:bootstrap_bin, r=nrc
run rustfmt on bootstrap/bin folder
2016-10-22 01:21:58 +02:00
Guillaume Gomez
18f9758c4f Rollup merge of #37043 - GuillaumeGomez:vec_urls, r=frewsxcv
Add missing urls on Vec docs

r? @steveklabnik
2016-10-22 01:21:58 +02:00
bors
a6fa57291b Auto merge of #37174 - mikhail-m1:dnlle, r=jonathandturner
improve "Doesn't live long enough" error

I've fixed only with same case

issue #36537 part of  #35233
r? @jonathandturner
2016-10-21 15:57:35 -07:00
Michael Woerister
e46c1ad9c9 Adapt codegen test to new naming scheme for generated symbols. 2016-10-21 18:29:25 -04:00
Michael Woerister
c52836c888 debuginfo: Use TypeIdHasher to create global type identifiers for debuginfo. 2016-10-21 17:56:36 -04:00
Michael Woerister
6f3edb034c type_id: Make result of std::intrinsics::type_id() endian-independent. 2016-10-21 17:53:49 -04:00
Michael Woerister
e6aa92c432 trans: Make names of internal symbols independent of CGU translation order.
Every codegen unit gets its own local counter for generating new symbol
names. This makes bitcode and object files reproducible at the binary
level even when incremental compilation is used.
2016-10-21 14:58:53 -04:00
Aidan Hobson Sayers
dceb2c9cd2 as_bytes is not the iterator, bytes is 2016-10-21 18:28:02 +01:00
Simon Sapin
7e603d4e3b Implement From<Cow<str>> for String and From<Cow<[T]>> for Vec<T>.
Motivation: the `selectors` crate is generic over a string type,
in order to support all of `String`, `string_cache::Atom`, and
`gecko_string_cache::Atom`. Multiple trait bounds are used
for the various operations done with these strings.
One of these operations is creating a string (as efficiently as possible,
re-using an existing memory allocation if possible) from `Cow<str>`.

The `std::convert::From` trait seems natural for this, but
the relevant implementation was missing before this PR.
To work around this I’ve added a `FromCowStr` trait in `selectors`,
but with trait coherence that means one of `selectors` or `string_cache`
needs to depend on the other to implement this trait.
Using a trait from `std` would solve this.

The `Vec<T>` implementation is just added for consistency.
I also tried a more general
`impl<'a, O, B: ?Sized + ToOwned<Owned=O>> From<Cow<'a, B>> for O`,
but (the compiler thinks?) it conflicts with `From<T> for T` the impl
(after moving all of `collections::borrow` into `core::borrow`
to work around trait coherence).
2016-10-21 17:42:29 +02:00
Niko Matsakis
483bc864ca add regression test for #37154
Fixes #37154
2016-10-21 11:13:36 -04:00
Niko Matsakis
567b11fc3a only remove keys that mention skolemized regions 2016-10-21 11:13:36 -04:00
Niko Matsakis
974817d493 when pop skol, also remove from proj cache 2016-10-21 11:13:34 -04:00
Артём Павлов [Artyom Pavlov]
34576da935
Small docstring changes for include_bytes and include_str 2016-10-21 18:03:22 +03:00
Артём Павлов [Artyom Pavlov]
b374c53ae6
Small doc change for include! 2016-10-21 17:44:19 +03:00
Артём Павлов [Artyom Pavlov]
ce8e4e71f8
libcore documentation for builtin macros 2016-10-21 17:23:50 +03:00
Guillaume Gomez
1fadd868cd Improve E0277 help message 2016-10-21 16:13:52 +02:00
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
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
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
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
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
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
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