Commit Graph

58453 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
Niko Matsakis
3dbf4d1e24 test case for changing a private fn in root of another crate 2016-10-21 18:31:34 -04:00
Michael Woerister
e46c1ad9c9 Adapt codegen test to new naming scheme for generated symbols. 2016-10-21 18:29:25 -04:00
Niko Matsakis
86b3f6cbbe add a test case for changing a private impl method across crates
Currently doesn't work that well at all in terms of getting reuse
afterwards, see #37333. =)
2016-10-21 18:02:47 -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
Devon Hollowood
5d31a818df Fix use of result_unwrap_or_default feature 2016-10-21 14:33:20 -07:00
Niko Matsakis
320055396b add test case for changes to a private fn 2016-10-21 17:30:12 -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
Ulrik Sverdrup
ee84ec1fa1 vec: Add a debug assertion where TrustedLen is used 2016-10-21 19:18:08 +02: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
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