Commit Graph

68966 Commits

Author SHA1 Message Date
Josh Stone
924331cc9b configure.py: fix --disable-option-checking
Getting the value of this argument needs another level of indexing,
as `known_args` are stored in `{dict}[list](opt, value)` form.

Also, when option-checking is disabled, let this bypass the check that
options are only passed once, and just apply the last value.
2017-10-26 17:19:29 -07:00
bors
b218a02ad8 Auto merge of #45519 - michaelwoerister:dedup-errors, r=arielb1
Don't emit the same compiler diagnostic twice.

This PR makes the compiler filter out diagnostic messages that have already been emitted during the same compilation session.
2017-10-26 18:16:15 +00:00
bors
b0b80f8c22 Auto merge of #45380 - dotdash:arg_copies, r=arielb1
Avoid unnecessary copies of arguments that are simple bindings

Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
2017-10-26 14:14:15 +00:00
Björn Steinbrink
8ad7c284d7 Add comments to clarify function argument ownership 2017-10-26 12:54:35 +02:00
Björn Steinbrink
0473a4f1d8 Avoid unnecessary copies of arguments that are simple bindings
Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
2017-10-26 12:54:34 +02:00
bors
e0febe7144 Auto merge of #45488 - oli-obk:ctfe_resolve, r=eddyb
Resolve types properly in const eval

r? @eddyb

cc @arielb1
2017-10-26 07:04:33 +00:00
bors
56dc171a2f Auto merge of #45464 - sinkuu:ice_44851, r=jseyfried
Visit attribute tokens in `DefCollector` and `BuildReducedGraphVisitor`

Fixes #44851.
2017-10-26 04:32:16 +00:00
bors
fa29bcedd1 Auto merge of #45096 - DSpeckhals:update-rls-data-for-save-analysis, r=alexcrichton
Update rls-data for save analysis

rls-data: 0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants (tuple and struct).

The first commit updates rls-data, and makes the changes to dump_visitor. The second commit updates the rls submodule, and removes "members" that were deleted from that update in src/Cargo.toml.

Note, that when building the project, rustfmt-nightly was updated in Cargo.lock. If these changes should be excluded, I can revert it.

cc/ @nrc
2017-10-26 00:58:52 +00:00
sinkuu
9f1a8bf318 Add FIXME 2017-10-26 09:42:24 +09:00
bors
e847f30f57 Auto merge of #45532 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

- Successful merges: #45059, #45212, #45398, #45483, #45496, #45508, #45526
- Failed merges:
2017-10-25 22:21:44 +00:00
kennytm
851d1c7365 Rollup merge of #45526 - alexcrichton:test-more-asm, r=aturon
ci: Test more asmjs again

This was accidentally added in #45352, forgot to back it out!
2017-10-26 03:02:54 +08:00
kennytm
5ae94d4fe2 Rollup merge of #45508 - bgermann:master, r=alexcrichton
Disable jemalloc for sparcv9-sun-solaris

Similar to #36994, rust programs segfault on SPARC64 Solaris machines.
2017-10-26 03:02:53 +08:00
kennytm
7ccdc105cf Rollup merge of #45496 - kennytm:bootstrap-fix-extension-check, r=alexcrichton
rustbuild: Fix `no output generated` error for next bootstrap cargo.

Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building dynamic libraries on Windows. The current bootstrap code does not understand files with multiple extensions, and will instead assume `xxxx.dll` is the file name. This caused a `no output generated` error because it tries to search for `xxxx.dll-hash.lib` inside the `deps/` folder, while it should check for `xxxx-hash.dll.lib` instead.

This PR is blocking #45285, see https://github.com/rust-lang/rust/pull/45285#issuecomment-338454149 and the rest of the comments for detail.
2017-10-26 03:02:52 +08:00
kennytm
86360b7ef5 Rollup merge of #45483 - mbrubeck:hash, r=alexcrichton
Implement Hash for raw pointers to unsized types

This is useful for some niche cases, like a hash table of slices or trait objects where the key is the raw pointer.  Example use case: https://docs.rs/by_address
2017-10-26 03:02:51 +08:00
kennytm
6402797f4d Rollup merge of #45398 - integer32llc:reassignment, r=arielb1
Correct misspelling in error text: re-assignment => reassignment

[reassignment is the correct spelling](https://www.thefreedictionary.com/reassignment) rather than re-assignment; this error message looks silly in the book next to text trying to be grammatically correct :-/

Will this cause any stability/backcompat type issues?
2017-10-26 03:02:50 +08:00
kennytm
fc48893845 Rollup merge of #45212 - GuillaumeGomez:sidebar-fixed, r=QuietMisdreavus
Limit the sidebar height

The sidebar is now fixed, which means its scrolling is independent of the main page now.

r? @rust-lang/docs
2017-10-26 03:02:49 +08:00
kennytm
bea6136b4a Rollup merge of #45059 - tmccombs:pid, r=alexcrichton
Add current_pid function

Fixes #44971
2017-10-26 03:02:48 +08:00
bors
f9d2416594 Auto merge of #44636 - GuillaumeGomez:little-error-msg, r=michaelwoerister
Add short error message-format

Fixes #42653.
2017-10-25 18:19:42 +00:00
Matt Brubeck
c2c1910d69 Implement Hash for raw pointers to unsized types 2017-10-25 11:07:13 -07:00
Alex Crichton
36822ba39a ci: Test more asmjs again
This was accidentally added in #45352, forgot to back it out!
2017-10-25 09:58:48 -07:00
bors
2f5ae25a34 Auto merge of #45513 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #45361, #45461, #45465, #45486, #45502
- Failed merges:
2017-10-25 15:34:03 +00:00
Carol (Nichols || Goulding)
0e46cf4db4 Reword to avoid using either re-assignment or reassignment in errors 2017-10-25 11:29:52 -04:00
Michael Woerister
9736474b6c Update ui tests for error message deduplication. 2017-10-25 15:02:41 +02:00
Michael Woerister
621d6f0f6d Update compile-fail tests for error message deduplication. 2017-10-25 15:02:26 +02:00
Michael Woerister
6fccd71f75 librustc_errors: Don't emit the same error message twice. 2017-10-25 15:01:06 +02:00
bors
f764eaf453 Auto merge of #45476 - Xanewok:fingerprint-disambiguator, r=michaelwoerister
Use 128 bit instead of Symbol for crate disambiguator

As discussed on gitter, this changes `crate_disambiguator` from Strings to what they are represented as, a 128 bit number.

There's also one bit I think also needs to change, but wasn't 100% sure how: [create_root_def](f338dba297/src/librustc/hir/map/definitions.rs (L468-L482)). Should I change `DefKey::root_parent_stable_hash` to accept `Fingerprint` as crate_disambiguator to quickly combine the hash of `crate_name` with the new 128 bit hash instead of a string for a disambiguator?

r? @michaelwoerister

EDIT: Are those 3 tests `mir-opt` failing, because the hash is different, because we calculate it a little bit differently (storing directly instead of hashing the hex-string representation)? Should it be updated like in #45319?
2017-10-25 12:38:10 +00:00
Michael Woerister
67f3dc3fee Rename some run-pass tests so they don't crash when executed from eCryptfs. 2017-10-25 13:15:04 +02:00
Oliver Schneider
1ee0ff3bfe
Add a regression test for the const eval type resolution 2017-10-25 10:17:20 +02:00
Oliver Schneider
490742e339
Resolve types properly in const eval 2017-10-25 10:17:20 +02:00
Guillaume Gomez
94c861865a Rollup merge of #45502 - GuillaumeGomez:show-src-on-mobile, r=QuietMisdreavus
Show src button and function version on mobile version

Fixes #45498.

<img width="1440" alt="screen shot 2017-10-24 at 22 36 09" src="https://user-images.githubusercontent.com/3050060/31966689-c0070404-b90b-11e7-8810-810fa0491eda.png">

r? @rust-lang/docs
2017-10-25 09:48:12 +02:00
Guillaume Gomez
a95d97a46b Rollup merge of #45486 - oli-obk:patch-9, r=kennytm
Update docs for Diagnostic::span_suggestion(s)
2017-10-25 09:48:11 +02:00
Guillaume Gomez
e09585c7c2 Rollup merge of #45465 - glaubitz:sparc64, r=alexcrichton
bootstrap: Add openssl configuration for sparc64-unknown-linux-gnu

Hi!

This adds the target missing mapping for sparc64-unknown-linux-gnu.

See: https://github.com/rust-lang/rust/issues/45456

Thanks
2017-10-25 09:48:10 +02:00
Guillaume Gomez
cb1e4142b4 Rollup merge of #45461 - wesleywiser:intrinsics_docs, r=dtolnay
Two small enhancements to intrinsics docs
2017-10-25 09:48:09 +02:00
Guillaume Gomez
5a7de598fa Rollup merge of #45361 - GuillaumeGomez:fs-docs, r=QuietMisdreavus
Add missing code examples

r? @rust-lang/docs
2017-10-25 09:48:08 +02:00
bors
b2478052f8 Auto merge of #45473 - SimonSapin:variance-red-green, r=nikomatsakis
Remove dependency tracking for variance computation

This custom tracking is now replaced by the red/green algorithm.

Fix https://github.com/rust-lang/rust/issues/45471
2017-10-25 05:02:32 +00:00
bors
6e61bbabe4 Auto merge of #45455 - kennytm:print-extern-impl-for-e0119, r=nikomatsakis
Improve diagnostic of E0119 with extern crate, try to print the conflicting impl.

Closes #27403.
Closes #23563.

Should improve #23980.

The diagnostic now looks like:

```
error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`:
  --> $DIR/issue-27403.rs:15:1
   |
15 | / impl<S> Into<S> for GenX<S> {
16 | |     fn into(self) -> S {
17 | |         self.inner
18 | |     }
19 | | }
   | |_^
   |
   = note: conflicting implementation in crate `core`:
           - impl<T, U> std::convert::Into<U> for T
             where U: std::convert::From<T>;

error: aborting due to previous error
```
2017-10-25 02:24:03 +00:00
Dustin Speckhals
aba409c1a2 Update RLS with skip of failing test 2017-10-24 21:29:26 -04:00
Dustin Speckhals
bca47e42b2 Merge branch 'master' into update-rls-data-for-save-analysis 2017-10-24 19:37:15 -04:00
bors
aa40292e78 Auto merge of #44603 - SimonSapin:stylo, r=alexcrichton
Add Stylo and WebRender to src/tools/cargotest

This is a subset of Servo that takes relatively less time to compile and does not use unstable Rust features.
2017-10-24 23:30:15 +00:00
bgermann
7bab5dabdd Disable jemalloc for sparcv9-sun-solaris
Similar to #36994, rust programs segfault on SPARC64 Solaris machines.
2017-10-25 00:52:56 +02:00
bors
c2799fc9a5 Auto merge of #45446 - leodasvacas:remove-libcollections, r=alexcrichton
Remove deprecated `collections` crate.

The real `collections` was merged with `alloc`, this facade was introduced [in this PR](https://github.com/rust-lang/rust/pull/42720) to give `#[no_std]` users time to adapt. This was done at least two cycles ago, now we can consider removing it for good.
2017-10-24 20:46:17 +00:00
Guillaume Gomez
deef11dd26 Show src button and function version on mobile version 2017-10-24 22:34:59 +02:00
Guillaume Gomez
e42da901a8 Fix doc build on other architectures than linux 2017-10-24 21:58:53 +02:00
Simon Sapin
daf84db4d2 Add WebRender to cargotest 2017-10-24 21:41:33 +02:00
Simon Sapin
9d2e83e759 Add Stylo to cargotest 2017-10-24 21:41:33 +02:00
Guillaume Gomez
9ce41f2544 Fix the sidebar height 2017-10-24 21:16:43 +02:00
Guillaume Gomez
b46c014cd3 Set rustfmt broken while waiting for the update of their side 2017-10-24 20:44:02 +02:00
kennytm
3b815730a7
rustbuild: Fix no output generated error for next bootstrap cargo.
Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building
dynamic libraries on Windows. The current bootstrap code does not
understand files with multiple extensions, and will instead assume
`xxxx.dll` is the file name. This caused a `no output generated` error
because it tries to search for `xxxx.dll-hash.lib` inside the `deps/`
folder, while it should check for `xxxx-hash.dll.lib` instead.

This PR is blocking #45285 (Bump to 1.23 and update bootstrap).
2017-10-25 00:32:28 +08:00
Igor Matuszewski
7fa64bcef3 Introduce CrateDisambiguator newtype and fix tests 2017-10-24 17:49:58 +02:00
bors
61af75437d Auto merge of #45350 - cjkenn:cjkenn/used-trait-imports, r=nikomatsakis
Put used trait imports field into a distinct query

Implementation for #45214

r+ @nikomatsakis
2017-10-24 15:18:08 +00:00