Commit Graph

75656 Commits

Author SHA1 Message Date
Mark Mansi
e3a374ac7d Fix alexcrichton's comments 2018-03-05 14:43:44 -06:00
Mark Mansi
50876d1ca4 Only check the whitelist for some crates 2018-03-05 14:43:44 -06:00
Mark Mansi
b9b1c378c5 Get the path to cargo from rustbuild 2018-03-05 14:43:44 -06:00
Mark Mansi
6e016c587f Trying to get paths right... 2018-03-05 14:43:44 -06:00
Mark Mansi
3570b9df6a MAKE IT FAILgit statusgit status 2018-03-05 14:43:44 -06:00
Mark Mansi
d62621839a Comments 2018-03-05 14:43:44 -06:00
Mark Mansi
3ee410498d Start adding a whitelist for rustc dependencies 2018-03-05 14:43:44 -06:00
Mark Mansi
2cb8c5fff6 Run rustfmt on tidy/src/deps.rs 2018-03-05 14:43:44 -06:00
leonardo.yvens
2e7e68b762 while let all the things 2018-03-05 15:58:54 -03:00
bors
c9334404f0 Auto merge of #48208 - michaelwoerister:track-features, r=petrochenkov
Turn feature-gate table into a query so it is covered by dependency tracking.

Turn access to feature gates into a query so we handle them correctly during incremental compilation.

Features are still available via `Session` through `features_untracked()`. I wish we had a better way of hiding untracked information. It would be great if we could remove the `sess` field from `TyCtxt`.

Fixes #47003.
2018-03-05 18:39:40 +00:00
Tobias Bucher
88f32d15af Remove a couple of isize references from hashmap docs
Also fix a spelling mistake.
2018-03-05 18:37:05 +01:00
topecongiro
05a9acc3b8 Implement FromStr for PathBuf 2018-03-06 01:03:16 +09:00
Songbird0
6d71aa47fb
Fix spelling error for whitespaces. 2018-03-05 14:33:37 +01:00
Michael Woerister
93625f12e0 Fix some merge fallout. 2018-03-05 11:05:01 +01:00
Michael Woerister
17b72bc1ea Fix procedural_mbe_matching test case after libsyntax change. 2018-03-05 11:05:01 +01:00
Michael Woerister
9f8b9a0d3e incr.comp.: Add regression test for detecting feature gate changes. 2018-03-05 11:05:01 +01:00
Michael Woerister
542bc75dea Turn features() into a query. 2018-03-05 11:05:01 +01:00
bobtwinkles
c0d41fb22c Update issue-48276 test to new stderr format 2018-03-05 04:20:04 -05:00
bobtwinkles
264c2013eb Fix #48276
The ExplicitSelf::determine function expects to be able to compare regions.
However, when the compare_self_type error reporting code runs we haven't
resolved bound regions yet. Thus we replace them with free regions first.
2018-03-05 02:47:08 -05:00
Songbird0
ef1aae1cc2
Modify wording and remove useless whitespaces. 2018-03-05 03:57:33 +01:00
1011X
9bfc062723 Fix doc example, and change fn annotation to stable 2018-03-04 20:32:44 -05:00
1011X
1a4aa1eb6e Fix doc example 2018-03-04 18:36:32 -05:00
bors
e2746d8700 Auto merge of #48736 - alexcrichton:fix-rust-src, r=3
Include stdsimd in rust-src component

Closes #48734
2018-03-04 22:24:20 +00:00
Songbird0
247fc38aeb
Tidy error: add a new line
The error was:

```
[00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3848: trailing whitespace
[00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: line longer than 100 chars
[00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: trailing whitespace
[00:05:26] some tidy checks failed
```
The line was truncated to 92 characters.
2018-03-04 22:18:42 +01:00
Songbird0
c68440cad4
Add a potential cause raising ParseIntError.
Initially, I wanted to add it directly to the documentation of `str. parse()' method, I finally found that it was more relevant (I hope so?) to directly document the structure in question. I've added a scenario, in which we could all get caught at least once, to make it easier to diagnose the problem when parsing integers.
2018-03-04 21:59:53 +01:00
Alex Crichton
2f2ac9ac47 Include stdsimd in rust-src component
Closes #48734
2018-03-04 12:13:21 -08:00
1011X
bebc34003e Fix unintended rename and a doc example 2018-03-04 14:39:14 -05:00
1011X
16076d4750 Declare ascii module in libcore/lib.rs 2018-03-04 13:44:43 -05:00
1011X
df283db4c1 Merge branch 'master' of github.com:1011X/rust 2018-03-04 13:35:21 -05:00
1011X
4e4c1b5b32 Added ascii module to core 2018-03-04 13:33:34 -05:00
bors
259e4a6784 Auto merge of #48592 - spastorino:borrowed_value_error, r=nikomatsakis
[NLL] Avoid borrowed value must be valid for lifetime '_#2r..." in errors

Closes #48428

- [x] If NLL is enabled, [do not invoke `note_and_explain_region`](https://github.com/rust-lang/rust/issues/48428#issuecomment-367691123)
- [x] Modify `-Zdump-nll-cause` to not print [the overwhelming debug output here](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L1288-L1299). This way we should I believe at least get nice-ish output for [our original example](https://github.com/rust-lang/rust/issues/48428#issue-299364536).
- [x] Extend `explain_why_borrow_contains_point` to also work for "universal lifetimes" like the `'a` in [the example at the end of this comment](https://github.com/rust-lang/rust/issues/48428#issuecomment-367691123).
- [ ] Figure out how to enable causal information all the time (but that is https://github.com/rust-lang/rust/issues/46590).
2018-03-04 18:16:43 +00:00
Pramod Bisht
6fdf6377cc Fixed #48425 2018-03-04 20:27:55 +05:30
debris
16ac85ce4d Remove useless powerpc64 entry from ARCH_TABLE, closes #47737 2018-03-04 14:58:10 +01:00
Guillaume Gomez
1c191b209b Add note for unterminated raw string error 2018-03-04 14:37:44 +01:00
bors
1e1bfc715f Auto merge of #47832 - fintelia:vec-index, r=kennytm
Have Vec use slice's implementations of Index<I> and IndexMut<I>

This PR simplifies the implementation of Index and IndexMut on Vec, and in the process enables indexing Vec by any user types that implement SliceIndex.

The stability annotations probably need to be changed, but I wasn't sure of the right way to do that. It also wasn't completely clear to me if this change could break any existing code.
2018-03-04 12:30:27 +00:00
leonardo.yvens
0b0e1b71d5 Refactor contrived match. 2018-03-04 08:31:09 -03:00
bors
9ff5cb5aea Auto merge of #48587 - Zoxc:transitive-relation, r=nikomatsakis
Make TransitiveRelation thread safe. Avoid locking by using get_mut in some cases

r? @nikomatsakis
2018-03-04 09:41:32 +00:00
bors
4a316e7483 Auto merge of #48630 - alexcrichton:more-sccache, r=kennytm
rustbuild: Pass `ccache` to build scripts

This is a re-attempt at #48192 hopefully this time with 100% less randomly
[blocking builds for 20 minutes][block]. To work around #48192 the sccache
server is started in the `run.sh` script very early on in the compilation
process.

[block]: https://github.com/rust-lang/rust/issues/48192
2018-03-04 07:09:41 +00:00
bors
4a7206323b Auto merge of #48125 - alexcrichton:lld, r=Mark-Simulacrum
rust: Import LLD for linking wasm objects

This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-04 04:22:39 +00:00
Alex Crichton
0129b01a41 rustc: Tweak default linker selection
This commit refactors how the path to the linker that we're going to invoke is
selected. Previously all targets listed *both* a `LinkerFlavor` and a `linker`
(path) option, but this meant that whenever you changed one you had to change
the other. The purpose of this commit is to avoid coupling these where possible.

Target specifications now only unconditionally define the *flavor* of the linker
that they're using by default. If not otherwise specified each flavor now
implies a particular default linker to run. As a result, this means that if
you'd like to test out `ld` for example you should be able to do:

    rustc -Z linker-flavor=ld foo.rs

whereas previously you had to do

    rustc -Z linker-flavor=ld -C linker=ld foo.rs

This will hopefully make it a bit easier to tinker around with variants that
should otherwise be well known to work, for example with LLD, `ld` on OSX, etc.
2018-03-03 20:21:35 -08:00
Alex Crichton
d69b24805b rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for
the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently
removed along with "binaryen linker" support in rustc.

Moving to LLD brings with it a number of benefits for wasm code:

* LLD is itself an actual linker, so there's no need to compile all wasm code
  with LTO any more. As a result builds should be *much* speedier as LTO is no
  longer forcibly enabled for all builds of the wasm target.
* LLD is quickly becoming an "official solution" for linking wasm code together.
  This, I believe at least, is intended to be the main supported linker for
  native code and wasm moving forward. Picking up support early on should help
  ensure that we can help LLD identify bugs and otherwise prove that it works
  great for all our use cases!
* Improvements to the wasm toolchain are currently primarily focused around LLVM
  and LLD (from what I can tell at least), so it's in general much better to be
  on this bandwagon for bugfixes and new features.
* Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD
  will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which
  means a postprocessor is no longer needed to show off Rust's "small wasm
  binary size".

LLD is added in a pretty standard way to rustc right now. A new rustbuild target
was defined for building LLD, and this is executed when a compiler's sysroot is
being assembled. LLD is compiled against the LLVM that we've got in tree, which
means we're currently on the `release_60` branch, but this may get upgraded in
the near future!

LLD is placed into rustc's sysroot in a `bin` directory. This is similar to
where `gcc.exe` can be found on Windows. This directory is automatically added
to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd`
linker which implements the interface that `wasm-ld`, LLD's frontend, expects.

Like Emscripten the LLD target is currently only enabled for Tier 1 platforms,
notably OSX/Windows/Linux, and will need to be installed manually for compiling
to wasm on other platforms. LLD is by default turned off in rustbuild, and
requires a `config.toml` option to be enabled to turn it on.

Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD
has a native option for controlling this.

[gc]: https://reviews.llvm.org/D42511
2018-03-03 20:21:35 -08:00
Scott McMurray
74c5c6e6cb Move process::ExitCode internals to sys
Now begins the saga of fixing compilation errors on other platforms...
2018-03-03 18:44:44 -08:00
bors
0be38e1ce3 Auto merge of #48600 - Mark-Simulacrum:rustbuild-updates-2, r=alexcrichton
Remove --host and --target arguments to configure in Dockerfiles

These arguments are passed to the relevant x.py invocation in all cases
anyway. As such, there is no need to separately configure them. x.py
will ignore the configuration when they are passed on the command line
anyway.

r? @alexcrichton
2018-03-04 01:32:57 +00:00
Tatsuyuki Ishi
517f861fc5 Remove ty::Predicate::Equate and ty::EquatePredicate (dead code) 2018-03-04 10:25:51 +09:00
Aravind Gollakota
81f0b962f3 Refactor away inferred_obligations from the trait selector 2018-03-03 18:47:17 -06:00
Shotaro Yamada
3d58543d49 Avoid unnecessary calculation 2018-03-04 09:43:29 +09:00
Shotaro Yamada
683bdc7f0a Add comments 2018-03-04 09:00:09 +09:00
flip1995
fc33b2567c Improve getting literal representation 2018-03-03 21:55:04 +01:00
bors
e026b59cf4 Auto merge of #48694 - kennytm:rollup, r=kennytm
Rollup of 8 pull requests

- Successful merges: #48283, #48466, #48569, #48629, #48637, #48680, #48513, #48664
- Failed merges:
2018-03-03 19:40:21 +00:00
Kurtis Nusbaum
f9c5b1f8e8 Update Feature Request instructions 2018-03-03 11:12:09 -08:00