]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAdded a `rustdoc` shortcut for collapse/expand all
Alex Ozdemir [Sat, 21 May 2016 02:21:35 +0000 (19:21 -0700)]
Added a `rustdoc` shortcut for collapse/expand all

Now when the user presses the "+" key all sections will collapse/expand.

Also added a note to the help screen which describes this behavior.

8 years agoAuto merge of #33318 - alexcrichton:hashmap-seed, r=aturon
bors [Fri, 20 May 2016 19:39:00 +0000 (12:39 -0700)]
Auto merge of #33318 - alexcrichton:hashmap-seed, r=aturon

std: Cache HashMap keys in TLS

This is a rebase and extension of #31356 where we not only cache the keys in
thread local storage but we also bump each key every time a new `HashMap` is
created. This should give us a nice speed bost in creating hash maps along with
retaining the property that all maps have a nondeterministic iteration order.

Closes #27243

8 years agoAuto merge of #33378 - oli-obk:fix/registry_args, r=Manishearth
bors [Fri, 20 May 2016 15:44:01 +0000 (08:44 -0700)]
Auto merge of #33378 - oli-obk:fix/registry_args, r=Manishearth

fix Registry::args for plugins loaded with --extra-plugins

r? @Manishearth

8 years agoAuto merge of #33729 - alexcrichton:patch-libbacktrace, r=sfackler
bors [Fri, 20 May 2016 11:34:34 +0000 (04:34 -0700)]
Auto merge of #33729 - alexcrichton:patch-libbacktrace, r=sfackler

std: Backport a libbacktrace soundness fix

This is a backport of gcc-mirror/gcc@047a1c2f which is a soundness fix for when
a backtrace is generated on executables that do not have debug information.

8 years agoAuto merge of #33553 - alexcrichton:cdylibs, r=brson
bors [Fri, 20 May 2016 07:34:50 +0000 (00:34 -0700)]
Auto merge of #33553 - alexcrichton:cdylibs, r=brson

rustc: Add a new crate type, cdylib

This commit is an implementation of [RFC 1510] which adds a new crate type,
`cdylib`, to the compiler. This new crate type differs from the existing `dylib`
crate type in a few key ways:

* No metadata is present in the final artifact
* Symbol visibility rules are the same as executables, that is only reachable
  `extern` functions are visible symbols
* LTO is allowed
* All libraries are always linked statically

This commit is relatively simple by just plubming the compiler with another
crate type which takes different branches here and there. The only major change
is an implementation of the `Linker::export_symbols` function on Unix which now
actually does something. This helps restrict the public symbols from a cdylib on
Unix.

With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB,
which is some nice size savings!

[RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510

Closes #33132

8 years agoAuto merge of #33358 - michaelwoerister:debuginfo-methods, r=eddyb
bors [Fri, 20 May 2016 03:40:44 +0000 (20:40 -0700)]
Auto merge of #33358 - michaelwoerister:debuginfo-methods, r=eddyb

debuginfo: Make DW_TAG_subroutine DIEs for inherent methods children of their self-type DIEs.

Fixes https://github.com/rust-lang/rust/issues/33192

8 years agostd: Cache HashMap keys in TLS
Alex Crichton [Sun, 1 May 2016 18:21:04 +0000 (11:21 -0700)]
std: Cache HashMap keys in TLS

This is a rebase and extension of #31356 where we cache the keys in thread local
storage. This should give us a nice speed bost in creating hash maps along with
mostly retaining the property that all maps have a nondeterministic iteration
order.

Closes #27243

8 years agoAuto merge of #33103 - ranma42:escape-unicode-last, r=alexcrichton
bors [Thu, 19 May 2016 23:22:50 +0000 (16:22 -0700)]
Auto merge of #33103 - ranma42:escape-unicode-last, r=alexcrichton

Implement `last` for `EscapeUnicode`

The implementation is quite trivial as the last character is always `'{'`.
As a side-effect it also improves the implementation of `last` for `EscapeUnicode`.

Part of #24214, split from #31049.

Maybe this (and the other changes that I will split from #31049) should wait for a test like `ed_iterator_specializations` to be added. Would it be sufficient to do the same for each possible escape length?

8 years agodebuginfo: Make DW_TAG_subroutine DIEs for inherent methods children of their self...
Michael Woerister [Sun, 1 May 2016 16:46:55 +0000 (12:46 -0400)]
debuginfo: Make DW_TAG_subroutine DIEs for inherent methods children of their self-type DIEs.

8 years agoMark the metadata symbol as reachable to fix OSX not finding dylibs.
Eduard Burtescu [Mon, 16 May 2016 17:05:43 +0000 (20:05 +0300)]
Mark the metadata symbol as reachable to fix OSX not finding dylibs.

8 years agorustc: Add a new crate type, cdylib
Alex Crichton [Tue, 10 May 2016 21:17:57 +0000 (14:17 -0700)]
rustc: Add a new crate type, cdylib

This commit is an implementation of [RFC 1510] which adds a new crate type,
`cdylib`, to the compiler. This new crate type differs from the existing `dylib`
crate type in a few key ways:

* No metadata is present in the final artifact
* Symbol visibility rules are the same as executables, that is only reachable
  `extern` functions are visible symbols
* LTO is allowed
* All libraries are always linked statically

This commit is relatively simple by just plubming the compiler with another
crate type which takes different branches here and there. The only major change
is an implementation of the `Linker::export_symbols` function on Unix which now
actually does something. This helps restrict the public symbols from a cdylib on
Unix.

With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB,
which is some nice size savings!

[RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510

Closes #33132

8 years agostd: Update libbacktrace for a soundness fix
Alex Crichton [Wed, 18 May 2016 23:59:06 +0000 (16:59 -0700)]
std: Update libbacktrace for a soundness fix

This updates the vendor'd libbacktrace source to tpick up
gcc-mirror/gcc@047a1c2f which is a soundness fix for when a backtrace is
generated on executables that do not have debug information.

8 years agoAuto merge of #33742 - Manishearth:rollup, r=Manishearth
bors [Thu, 19 May 2016 16:45:53 +0000 (09:45 -0700)]
Auto merge of #33742 - Manishearth:rollup, r=Manishearth

Rollup of 10 pull requests

- Successful merges: #33353, #33611, #33696, #33698, #33705, #33708, #33712, #33720, #33721, #33730
- Failed merges:

8 years agoRollup merge of #33730 - jseyfried:fix_macro_backtrace_diagnostics, r=nikomatsakis
Manish Goregaokar [Thu, 19 May 2016 15:51:08 +0000 (21:21 +0530)]
Rollup merge of #33730 - jseyfried:fix_macro_backtrace_diagnostics, r=nikomatsakis

Fix macro expansion backtrace diagnostics

Fixes #33704.
r? @nikomatsakis

8 years agoRollup merge of #33721 - royalstream:royalstream-doc-highlights, r=Manishearth
Manish Goregaokar [Thu, 19 May 2016 15:51:07 +0000 (21:21 +0530)]
Rollup merge of #33721 - royalstream:royalstream-doc-highlights, r=Manishearth

Rust syntax coloring for some ignore, should-panic and no-run snippets.

In the book, some code blocks were missing the `rust` specifier which is needed for them to highlight correctly.

8 years agoRollup merge of #33720 - mark-summerfield:patch-1, r=steveklabnik
Manish Goregaokar [Thu, 19 May 2016 15:51:07 +0000 (21:21 +0530)]
Rollup merge of #33720 - mark-summerfield:patch-1, r=steveklabnik

Clarified that `let(mut x, y) =` only makes x mutable, not y

Closes #33716

8 years agoRollup merge of #33712 - jseyfried:fix_expanded_expr_span_bug, r=nrc
Manish Goregaokar [Thu, 19 May 2016 15:51:07 +0000 (21:21 +0530)]
Rollup merge of #33712 - jseyfried:fix_expanded_expr_span_bug, r=nrc

Fix bug in macro expression spans

Fix a bug in macro expression spans.
r? @nrc

8 years agoRollup merge of #33708 - nham:zero-elided-lifetimes, r=sanxiyn
Manish Goregaokar [Thu, 19 May 2016 15:51:06 +0000 (21:21 +0530)]
Rollup merge of #33708 - nham:zero-elided-lifetimes, r=sanxiyn

Only print parameters with elided lifetimes in elision error messages.

When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.

Fixes #30255.

8 years agoRollup merge of #33705 - lqd:rustdoc-version-tooltip, r=GuillaumeGomez
Manish Goregaokar [Thu, 19 May 2016 15:51:06 +0000 (21:21 +0530)]
Rollup merge of #33705 - lqd:rustdoc-version-tooltip, r=GuillaumeGomez

rustdoc: Make the #[stable(since)] version attribute clearer with a tooltip

Rustdoc's new 'since' version placement only shows the version number in which the item was marked stable. This gains space but might make the meaning of this version string less clear in the docs, so I tried to bring some explicitness in a tooltip.

8 years agoRollup merge of #33698 - alexcrichton:update-libc, r=japaric
Manish Goregaokar [Thu, 19 May 2016 15:51:06 +0000 (21:21 +0530)]
Rollup merge of #33698 - alexcrichton:update-libc, r=japaric

std: Update libc submodule

Brings in a fix where `-lutil` is no longer passed for musl targets, lifting the
need for a musl toolchain to be installed again.

Closes #33608

8 years agoRollup merge of #33696 - nham:add-test-21225, r=luqmana
Manish Goregaokar [Thu, 19 May 2016 15:51:05 +0000 (21:21 +0530)]
Rollup merge of #33696 - nham:add-test-21225, r=luqmana

Add regression tests for error message when using enum variant as a type

I'm guessing these were actually fixed with PR #27085.

Closes #21225
Closes #19197

8 years agoRollup merge of #33611 - vvanders:master, r=steveklabnik
Manish Goregaokar [Thu, 19 May 2016 15:51:05 +0000 (21:21 +0530)]
Rollup merge of #33611 - vvanders:master, r=steveklabnik

Add a note about Higher-Ranked Trait Bounds in docs on Closures.

I hit a snag with lifetimes a few days ago and it wasn't until @birkenfeld pointed out Higher-Ranked Trait Bounds that I was able to solve the issue involving lifetimes on closure traits. This adds a small section in the book so that other users can find it.

r? @steveklabnik

8 years agoRollup merge of #33353 - timothy-mcroy:E0502, r=sanxiyn
Manish Goregaokar [Thu, 19 May 2016 15:51:05 +0000 (21:21 +0530)]
Rollup merge of #33353 - timothy-mcroy:E0502, r=sanxiyn

Add error explanation for E0502

I am questioning the order of presentation on the suggested code fixes, but I'm not sure what would be best.  Thoughts?

r? @GuillaumeGomez

8 years agoAuto merge of #33702 - crimsun:pr33678, r=alexcrichton
bors [Thu, 19 May 2016 12:48:11 +0000 (05:48 -0700)]
Auto merge of #33702 - crimsun:pr33678, r=alexcrichton

Resolved rustdoc crash (#33678) by aborting instead of unwrapping.

Also removed Option use and comment to match.

Fixes https://github.com/rust-lang/rust/issues/33678

8 years agoMake the #[stable(since)] version attribute clearer with a tooltip
Rémy Rakic [Wed, 18 May 2016 01:54:52 +0000 (03:54 +0200)]
Make the #[stable(since)] version attribute clearer with a tooltip

8 years agoAuto merge of #33694 - arielb1:fuzzy-on-unimplemented, r=nikomatsakis
bors [Thu, 19 May 2016 08:50:53 +0000 (01:50 -0700)]
Auto merge of #33694 - arielb1:fuzzy-on-unimplemented, r=nikomatsakis

implement fuzzy matching in on_unimplemented

Fixes #31062

r? @nikomatsakis

8 years agoAuto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakis
bors [Thu, 19 May 2016 04:19:07 +0000 (21:19 -0700)]
Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakis

Fix for old school error issues, improvements to new school

This PR:
* Fixes some old school error issues, specifically #33559, #33543, #33366
* Improves wording borrowck errors with match patterns
* De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here"
* Rollup of #33392 (which should help fix #33390)

r? @nikomatsakis

8 years agoFix macro expansion backtrace diagnostics
Jeffrey Seyfried [Thu, 19 May 2016 00:19:57 +0000 (00:19 +0000)]
Fix macro expansion backtrace diagnostics

8 years agoAuto merge of #33686 - GuillaumeGomez:error-code-tests, r=steveklabnik
bors [Wed, 18 May 2016 22:12:56 +0000 (15:12 -0700)]
Auto merge of #33686 - GuillaumeGomez:error-code-tests, r=steveklabnik

Add new error code tests

r? @steveklabnik

8 years agoaddress review comments
Ariel Ben-Yehuda [Wed, 18 May 2016 20:28:31 +0000 (23:28 +0300)]
address review comments

8 years agoSimplify report_elision_failure a little bit.
Nick Hamann [Wed, 18 May 2016 18:09:25 +0000 (13:09 -0500)]
Simplify report_elision_failure a little bit.

8 years agoRust syntax coloring for some ignore, should-panic and no-run snippets.
Steven Burns [Wed, 18 May 2016 17:30:50 +0000 (11:30 -0600)]
Rust syntax coloring for some ignore, should-panic and no-run snippets.

8 years agoClarified that `let(mut x, y) =` only makes x mutable, not y
mark-summerfield [Wed, 18 May 2016 16:43:22 +0000 (17:43 +0100)]
Clarified that `let(mut x, y) =` only makes x mutable, not y

8 years agoimplement fuzzy matching in on_unimplemented
Ariel Ben-Yehuda [Tue, 17 May 2016 18:55:34 +0000 (21:55 +0300)]
implement fuzzy matching in on_unimplemented

8 years agoAuto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mw
bors [Wed, 18 May 2016 15:47:53 +0000 (08:47 -0700)]
Auto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mw

track incr. comp. dependencies across crates

This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are:

- computing a hash representing the metadata for an item we are emitting
  - we do this by making `MetaData(X)` be the current task while computing metadata for an item
  - this naturally registers reads from any tables and things that we read for that purpose
  - we can then hash all the inputs to those tables
- tracking when we access metadata
  - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read
- hashing metadata from foreign items
  - we do this by loading up metadata from a file in the incr. comp. directory
  - if there is no file, we use the SVH for the entire crate

There is one very simple test only at this point. The next PR will be focused on expanding out the tests.

Note that this is based on top of https://github.com/rust-lang/rust/pull/33228

r? @michaelwoerister

8 years agoadd task for linking
Niko Matsakis [Wed, 18 May 2016 13:23:40 +0000 (09:23 -0400)]
add task for linking

In MSVC (at least), linking requires accessing metadata, which generates
reads.

8 years agofix indentation of session/mod.rs
Niko Matsakis [Fri, 13 May 2016 22:48:54 +0000 (18:48 -0400)]
fix indentation of session/mod.rs

8 years agoadd debug info to dep_graph
Niko Matsakis [Fri, 13 May 2016 22:48:46 +0000 (18:48 -0400)]
add debug info to dep_graph

8 years agonit: cache crate-hash for next time
Niko Matsakis [Thu, 12 May 2016 15:37:08 +0000 (11:37 -0400)]
nit: cache crate-hash for next time

8 years agonit: use format! instead of iterator
Niko Matsakis [Thu, 12 May 2016 14:12:58 +0000 (10:12 -0400)]
nit: use format! instead of iterator

8 years agobasic tests for cross-crate hashing
Niko Matsakis [Fri, 6 May 2016 19:17:55 +0000 (15:17 -0400)]
basic tests for cross-crate hashing

8 years agoload/save hashes of metadata
Niko Matsakis [Fri, 6 May 2016 19:09:31 +0000 (15:09 -0400)]
load/save hashes of metadata

This commit reorganizes how the persist code treats hashing. The idea is
that each crate saves a file containing hashes representing the metadata
for each item X. When we see a read from `MetaData(X)`, we can load this
hash up (if we don't find a file for that crate, we just use the SVH for
the entire crate).

To compute the hash for `MetaData(Y)`, where Y is some local item, we
examine all the predecessors of the `MetaData(Y)` node and hash their
hashes together.

8 years agoallow retracing paths across crates
Niko Matsakis [Fri, 6 May 2016 18:52:57 +0000 (14:52 -0400)]
allow retracing paths across crates

For external crates, we must build up a map that goes from
the DefKey to the DefIndex. We do this by iterating over each
index that is found in the metadata and loading the associated
DefKey.

8 years agocleanup dep-graph debugging code
Niko Matsakis [Fri, 6 May 2016 09:02:05 +0000 (05:02 -0400)]
cleanup dep-graph debugging code

Create some re-usable filtering subroutines.

8 years agochange svh to store a u64
Niko Matsakis [Fri, 6 May 2016 09:01:09 +0000 (05:01 -0400)]
change svh to store a u64

We used to store a u64 converted to a String for some reason. Now we
don't.

8 years agopass revision and incr_comp directory to auxbuild
Niko Matsakis [Thu, 5 May 2016 00:44:22 +0000 (20:44 -0400)]
pass revision and incr_comp directory to auxbuild

This is needed for incremental compilation harness to support
cross-crate testing. Also support cfg for typechecking prettyprint

8 years agoalways encode variant fields
Niko Matsakis [Fri, 22 Apr 2016 19:18:02 +0000 (15:18 -0400)]
always encode variant fields

we need them to be able to retrace.

8 years agomake the filename computation take a cratenum
Niko Matsakis [Wed, 6 Apr 2016 21:54:40 +0000 (17:54 -0400)]
make the filename computation take a cratenum

8 years agoidentify inputs of `MetaData(X)` nodes
Niko Matsakis [Wed, 6 Apr 2016 21:28:59 +0000 (17:28 -0400)]
identify inputs of `MetaData(X)` nodes

Generate a second hash file that contains the metadata for an X node.

8 years agorename the dep-graph file to include crate ident
Niko Matsakis [Wed, 6 Apr 2016 16:01:40 +0000 (12:01 -0400)]
rename the dep-graph file to include crate ident

This way, multiple compilations can share the same work directory.

8 years agowhen encoding, push MetaData(foo) task on stack
Niko Matsakis [Wed, 6 Apr 2016 18:49:50 +0000 (14:49 -0400)]
when encoding, push MetaData(foo) task on stack

This lets us determine what was used to construct the metadata.

Conflicts:
src/librustc_metadata/encoder.rs

8 years agoadd a MetaData node and trigger reads from it
Niko Matsakis [Fri, 22 Apr 2016 19:47:14 +0000 (15:47 -0400)]
add a MetaData node and trigger reads from it

Conflicts:
src/librustc_metadata/csearch.rs

8 years agoignore dep-graph in resolve and lower_crate
Niko Matsakis [Wed, 11 May 2016 00:50:00 +0000 (20:50 -0400)]
ignore dep-graph in resolve and lower_crate

This got removed at some point, it seems.

8 years agothread the DepGraph to session/crate-store
Niko Matsakis [Tue, 29 Mar 2016 17:19:37 +0000 (13:19 -0400)]
thread the DepGraph to session/crate-store

This is a [breaking-change] for plugin authors.
You must now create a dep-graph earlier.

8 years agoremove the `Any` bound from `CrateStore`
Niko Matsakis [Tue, 29 Mar 2016 00:05:35 +0000 (20:05 -0400)]
remove the `Any` bound from `CrateStore`

This is a [breaking-change] for plugins, which
ought by now to have stopped relying on downcasting.

8 years agoadd MetaData DepNode variant
Niko Matsakis [Tue, 29 Mar 2016 00:01:48 +0000 (20:01 -0400)]
add MetaData DepNode variant

8 years agoFix tidy error
Jonathan Turner [Wed, 18 May 2016 12:30:46 +0000 (08:30 -0400)]
Fix tidy error

8 years agoAuto merge of #33710 - Manishearth:rollup, r=Manishearth
bors [Wed, 18 May 2016 12:04:26 +0000 (05:04 -0700)]
Auto merge of #33710 - Manishearth:rollup, r=Manishearth

Rollup of 5 pull requests

- Successful merges: #33656, #33666, #33673, #33675, #33695
- Failed merges:

8 years agoFix bug in macro expression spans
Jeffrey Seyfried [Wed, 18 May 2016 11:26:54 +0000 (11:26 +0000)]
Fix bug in macro expression spans

8 years agoAdd new error code tests
ggomez [Tue, 17 May 2016 13:01:31 +0000 (15:01 +0200)]
Add new error code tests

8 years agoRollup merge of #33695 - nikomatsakis:spezializes-cache, r=aturon
Manish Goregaokar [Wed, 18 May 2016 08:37:46 +0000 (14:07 +0530)]
Rollup merge of #33695 - nikomatsakis:spezializes-cache, r=aturon

introduce a specializes cache

This query is frequently used during trait selection and caching the
result can be a reasonable performance win.

The one case I examined thus far was the mrusty package (v0.5.1), where I saw an improvement in "typeck item bodies" from ~8.3s to ~1.9s.

r? @aturon

8 years agoRollup merge of #33675 - apasel422:issue-33662, r=pnkfelix
Manish Goregaokar [Wed, 18 May 2016 08:37:45 +0000 (14:07 +0530)]
Rollup merge of #33675 - apasel422:issue-33662, r=pnkfelix

Add missing code fence to `diagnostics.rs`

Closes #33662

8 years agoRollup merge of #33673 - GuillaumeGomez:fix-selected-item-style, r=steveklabnik
Manish Goregaokar [Wed, 18 May 2016 08:37:45 +0000 (14:07 +0530)]
Rollup merge of #33673 - GuillaumeGomez:fix-selected-item-style, r=steveklabnik

Fix selected item background style

r? @steveklabnik

8 years agoRollup merge of #33666 - xen0n:no-more-nest-levels, r=nikomatsakis
Manish Goregaokar [Wed, 18 May 2016 08:37:45 +0000 (14:07 +0530)]
Rollup merge of #33666 - xen0n:no-more-nest-levels, r=nikomatsakis

syntax_ext: format: nest_level's are no more

Just noticed this while working on #33642 and here's a quick fix, shouldn't touch anything else. It's some historic code indeed...

8 years agoRollup merge of #33656 - GuillaumeGomez:lifetime_bound, r=steveklabnik
Manish Goregaokar [Wed, 18 May 2016 08:37:44 +0000 (14:07 +0530)]
Rollup merge of #33656 - GuillaumeGomez:lifetime_bound, r=steveklabnik

Add lifetime's bounds in doc generation

Fixes #33653

![screenshot from 2016-05-15 15 30 38](https://cloud.githubusercontent.com/assets/3050060/15274445/024dbd5c-1ab2-11e6-9387-274301a05627.png)

r? @steveklabnik

8 years agoAuto merge of #33654 - petrochenkov:hirident, r=nrc
bors [Wed, 18 May 2016 07:27:49 +0000 (00:27 -0700)]
Auto merge of #33654 - petrochenkov:hirident, r=nrc

Remove hir::Ident

Now when name resolution is done on AST, `hir::Ident` is no longer necessary.
See https://github.com/rust-lang/rust/pull/30145 for more details.

r? @nrc

8 years agoOnly print parameters with elided lifetimes in elision error messages.
Nick Hamann [Wed, 18 May 2016 05:02:04 +0000 (00:02 -0500)]
Only print parameters with elided lifetimes in elision error messages.

When displaying the function parameters for a lifetime elision error message,
this changes it to first filter out the parameters that don't have elided
lifetimes.

Fixes #30255.

8 years agoAdd descriptive error explanation for E0502
Timothy McRoy [Sun, 15 May 2016 20:30:59 +0000 (15:30 -0500)]
Add descriptive error explanation for E0502

8 years agoAuto merge of #33137 - nikomatsakis:issue-32330-lbr-in-return-type-warning-2, r=aturon
bors [Wed, 18 May 2016 01:10:53 +0000 (18:10 -0700)]
Auto merge of #33137 - nikomatsakis:issue-32330-lbr-in-return-type-warning-2, r=aturon

Warnings for issue #32330

This is an extension of the previous PR that issues warnings in more situations than before. It does not handle *all* cases of #32330 but I believe it issues warnings for all cases I've seen in practice.

Before merging I'd like to address:

- open a good issue explaining the problem and how to fix it (I have a [draft writeup][])
- work on the error message, which I think is not as clear as it could/should be (suggestions welcome)

r? @aturon

[draft writeup]: https://gist.github.com/nikomatsakis/631ec8b4af9a18b5d062d9d9b7d3d967

8 years agofix stale method names
Niko Matsakis [Mon, 4 Apr 2016 19:28:52 +0000 (15:28 -0400)]
fix stale method names

8 years agowarn for where/return-types that reference regions
Niko Matsakis [Tue, 22 Mar 2016 10:37:12 +0000 (06:37 -0400)]
warn for where/return-types that reference regions

This is a step towards fixing #32330. The full fix would be a breaking
change, so we begin by issuing warnings for scenarios that will break.

8 years agoResolved rustdoc crash (#33678) by aborting instead of unwrapping.
User [Tue, 17 May 2016 23:08:45 +0000 (03:38 +0430)]
Resolved rustdoc crash (#33678) by aborting instead of unwrapping.
Removed Option use and comment to match.

8 years agostd: Update libc submodule
Alex Crichton [Tue, 17 May 2016 21:59:06 +0000 (14:59 -0700)]
std: Update libc submodule

Brings in a fix where `-lutil` is no longer passed for musl targets, lifting the
need for a musl toolchain to be installed again.

Closes #33608

8 years agoAdd regression tests for error message when using enum variant as a type
Nick Hamann [Tue, 17 May 2016 20:33:31 +0000 (15:33 -0500)]
Add regression tests for error message when using enum variant as a type

I'm guessing these were actually fixed with PR #27085.

Closes #21225
Closes #19197

8 years agofix -Z treat-err-as-bug
Niko Matsakis [Thu, 21 Apr 2016 09:14:58 +0000 (05:14 -0400)]
fix -Z treat-err-as-bug

8 years agorefactor: use `select` inside of a probe
Niko Matsakis [Tue, 15 Mar 2016 10:10:01 +0000 (06:10 -0400)]
refactor: use `select` inside of a probe

We ought not to be affecting inference state when assembling candidates,
so invoke select inside of a probe.

8 years agoAuto merge of #33665 - golddranks:thread-park-add-big-picture-explanation, r=aturon
bors [Tue, 17 May 2016 20:11:57 +0000 (13:11 -0700)]
Auto merge of #33665 - golddranks:thread-park-add-big-picture-explanation, r=aturon

Added a big-picture explanation for thread::park() & co.

As I said in https://www.reddit.com/r/rust/comments/4ihvv1/hey_rust_programmers_got_a_question_ask_here/d372s4i, the current explanation of the `park()` and `unpark()` is a bit unclear. It says that they're used for blocking, but then it goes on explaining the semantics in detail, leaving the bigger picture a bit unclear.

I added a short high-level explanation that explains how the functions are used. I also exposed the full paths (`thread::park()` and `thread::Thread::unpark()`), because `unpark()`, being a method, is not directly visible at the module level.

8 years agointroduce a specializes cache
Niko Matsakis [Tue, 17 May 2016 16:05:02 +0000 (12:05 -0400)]
introduce a specializes cache

This query is frequently used during trait selection and caching the
result can be a reasonable performance win.

8 years agoFix for #33559
Jonathan Turner [Tue, 17 May 2016 15:27:58 +0000 (11:27 -0400)]
Fix for #33559

8 years agoAuto merge of #33682 - GuillaumeGomez:fix-error-explanation-enum, r=sanxiyn
bors [Tue, 17 May 2016 14:53:49 +0000 (07:53 -0700)]
Auto merge of #33682 - GuillaumeGomez:fix-error-explanation-enum, r=sanxiyn

Fix invalid enum declaration

r? @steveklabnik
cc @Ms2ger

8 years agoFix invalid enum declaration
Guillaume Gomez [Tue, 17 May 2016 11:15:46 +0000 (13:15 +0200)]
Fix invalid enum declaration

8 years agoAuto merge of #33617 - sanmai-NL:gitignore_IntelliJ, r=nikomatsakis
bors [Tue, 17 May 2016 11:02:15 +0000 (04:02 -0700)]
Auto merge of #33617 - sanmai-NL:gitignore_IntelliJ, r=nikomatsakis

IntelliJ support, ordering, cleanup

8 years agoImprove a few errors and fix #33366
Jonathan Turner [Mon, 16 May 2016 22:40:50 +0000 (18:40 -0400)]
Improve a few errors and fix #33366

8 years agoDe-emph minimized spans, add better debugging output
Jonathan Turner [Mon, 16 May 2016 19:39:25 +0000 (15:39 -0400)]
De-emph minimized spans, add better debugging output

8 years agoPrint secondary labels as notes in old skool mode
Jonathan Turner [Mon, 16 May 2016 12:50:01 +0000 (08:50 -0400)]
Print secondary labels as notes in old skool mode

8 years agoAuto merge of #33651 - Nercury:update-i686-android-target-to-match-abi, r=alexcrichton
bors [Tue, 17 May 2016 05:35:00 +0000 (22:35 -0700)]
Auto merge of #33651 - Nercury:update-i686-android-target-to-match-abi, r=alexcrichton

Update i686-linux-android features to match android x86 ABI.

Based on [android's official x86 ABI info](http://developer.android.com/ndk/guides/abis.html#x86), the x86 baseline CPU can be safely updated to `pentiumpro`, with the addition of `MMX`, `SSE`, `SSE2`, `SSE3`, `SSSE3` features.

r? @alexcrichton

8 years agoAuto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakis
bors [Tue, 17 May 2016 01:39:59 +0000 (18:39 -0700)]
Auto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakis

Replace the obligation forest with a graph

In the presence of caching, arbitrary nodes in the obligation forest can be merged, which makes it a general graph. Handle it as such, using cycle-detection algorithms in the processing.

I should do performance measurements sometime.

This was pretty much written as a proof-of-concept. Please help me write this in a less-ugly way. I should also add comments explaining what is going on.

r? @nikomatsakis

8 years agoAuto merge of #33588 - nikomatsakis:compiletest-ui, r=acrichto
bors [Mon, 16 May 2016 21:41:50 +0000 (14:41 -0700)]
Auto merge of #33588 - nikomatsakis:compiletest-ui, r=acrichto

add UI testing framework

This adds a framework for capturing and tracking the precise output of rustc, which allows us to check all manner of minor details with the output. It's pretty strict right now -- the output must match almost exactly -- and hence maybe a bit too strict. But I figure we can add wildcards or whatever later. There is also a script intended to make updating the references easy, though the script could make things a *bit* easier (in particular, it'd be nice if it would find the build directory for you automatically).

One thing I was wondering about is the best way to test colors. Since windows doesn't embed those in the output stream, this test framework can't test colors on windows -- so I figure we can just write tests that are ignored on windows and which pass `--color=always` or whatever to rustc.

cc @jonathandturner
r? @alexcrichton

8 years agoAdd missing code fence to `diagnostics.rs`
Andrew Paseltiner [Mon, 16 May 2016 20:57:33 +0000 (16:57 -0400)]
Add missing code fence to `diagnostics.rs`

Closes #33662

8 years agopacify the mercilous tidy
Niko Matsakis [Mon, 16 May 2016 16:50:40 +0000 (12:50 -0400)]
pacify the mercilous tidy

8 years agoFix selected item background style
Guillaume Gomez [Mon, 16 May 2016 20:36:13 +0000 (22:36 +0200)]
Fix selected item background style

8 years agochange on_unimplented logic
Ariel Ben-Yehuda [Mon, 16 May 2016 20:16:52 +0000 (23:16 +0300)]
change on_unimplented logic

8 years agoFix rebase
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
Fix rebase

8 years agolowering: Rename identifiers only when necessary
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
lowering: Rename identifiers only when necessary

Do not rename invalid identifiers, they stop being invalid after renaming

8 years agoRemove hir::Ident
Vadim Petrochenkov [Sun, 6 Mar 2016 12:54:44 +0000 (15:54 +0300)]
Remove hir::Ident

8 years agoAuto merge of #33500 - Nercury:update-aarch64-android-target-to-match-abi, r=alexcrichton
bors [Mon, 16 May 2016 19:15:10 +0000 (12:15 -0700)]
Auto merge of #33500 - Nercury:update-aarch64-android-target-to-match-abi, r=alexcrichton

Update aarch64-linux-android target to match android abi.

- Changed `target_env` to "gnu" to empty "" for all android targets because it does not matter for android.
- The PR #33048 added "max_atomic_width" for arm-android but missed recently added armv7-android. Add it there too.
- Added features `+neon,+fp-armv8` because they [must exist on `aarch64` android](http://developer.android.com/ndk/guides/cpu-features.html).
- Update libc to include https://github.com/rust-lang/libc/pull/282 so that rust's std lib works on android's aarch64 (the main issue there was incorrect structure alignment on 64-bit arm).

r? @alexcrichton

8 years agoAuto merge of #33429 - ranma42:fix-x87-parsing, r=alexcrichton
bors [Mon, 16 May 2016 16:46:09 +0000 (09:46 -0700)]
Auto merge of #33429 - ranma42:fix-x87-parsing, r=alexcrichton

Fix fast path of float parsing on x87

The fast path of the float parser relies on the rounding to happen
exactly and directly to the correct number of bits. On x87, instead,
double rounding would occour as the FPU stack defaults to 80 bits of
precision.

This can be fixed by setting the precision of the FPU stack before
performing the int to float conversion. This can be achieved by
changing the value of the x87 control word. This is a somewhat common
operation that is in fact performed whenever a float needs to be
truncated to an integer, but it is undesirable to add its overhead for
code that does not rely on x87 for computations (i.e. on non-x86
architectures, or x86 architectures which perform FPU computations on
using SSE).

Fixes `num::dec2flt::fast_path_correct` (on x87).

8 years agoAuto merge of #33663 - rphmeier:recover_rename, r=sfackler
bors [Mon, 16 May 2016 14:25:04 +0000 (07:25 -0700)]
Auto merge of #33663 - rphmeier:recover_rename, r=sfackler

rename a few occurrences of RecoverSafe in docs

8 years agoFix `asm!` blocks
Andrea Canciani [Mon, 16 May 2016 13:41:45 +0000 (15:41 +0200)]
Fix `asm!` blocks

The `volatile` modifier was incorrectly written outside of the `asm!`
blocks.

8 years agoCleanup documentation
Andrea Canciani [Mon, 16 May 2016 13:37:14 +0000 (15:37 +0200)]
Cleanup documentation

Remove irrelevant information (and instead provide pointer to
reference documentation), replace ASCII-art table with the
corresponding MarkDown one, and minor fixes.