Commit Graph

344 Commits

Author SHA1 Message Date
Oliver Schneider acac58502b
Move large chunks of miri from rustc::mir::interpret to rustc_mir::interpret 2017-12-12 17:27:07 +01:00
Oliver Schneider a792b6c914
Merge remote-tracking branch 'origin/master' into miri 2017-12-06 13:41:46 +01:00
Oliver Schneider acdf83f228
Update miri to rustc changes 2017-12-06 09:25:29 +01:00
Nick Cameron 36c380292c Update Cargo 2017-12-06 18:21:14 +13:00
Nick Cameron 75029259b3 Update rls and rustfmt 2017-12-06 18:18:44 +13:00
bors a2899408dd Auto merge of #46503 - Aaron1011:librustdoc_log, r=Mark-Simulacrum
Remove librustdoc dependency on log

This change should have been included in PR #46386.

Since librustdoc doesn't explicitly depend on internal crates
(such as librustc_driver) through its Cargo.toml, it ends up using the
sysroot to resolve them. By removing the dependency on 'log',
we ensure that the syroot is used to resolve `log` as well. This ensures
that only one version of log is in use, so that `env_logger::init()`
enables all uses of `log!` macros.
2017-12-05 09:00:35 +00:00
Aaron Hill f6d3900642
Remove librustdoc dependency on log
This change should have been included in PR #46386.

Since librustdoc doesn't explicitly depend on internal crates
(such as librustc_driver) through its Cargo.toml, it ends up using the
sysroot to resolve them. By removing the dependency on 'log',
we ensure that the syroot is used to resolve `log` as well. This ensures
that only one version of log is in use, so that `env_logger::init()`
enables all uses of `log!` macros.
2017-12-04 17:16:19 -05:00
Irina-Gabriela Popa 2c175df013 rustc_back: replace tempdir with crates.io version. 2017-12-04 18:25:31 +02:00
Irina-Gabriela Popa dda924ab6a rustc_back: move dynamic_lib to rustc_metadata. 2017-12-04 18:25:29 +02:00
Irina-Gabriela Popa d6f70359dc rustc_back: remove slice module in favor of std::slice::from_ref. 2017-12-04 18:25:06 +02:00
bors c3942e751c Auto merge of #46288 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
Bump to 1.24.0

* Update the in-tree version number
* Update the bootstrap compiler
* Remove `cfg(stage0)` annotations
* Update crate dependencies
* Update Cargo itself
2017-12-02 05:21:58 +00:00
kennytm ae24366251 Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum
Remove librustdoc dependency on env_logger

We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383
2017-12-02 01:38:57 +08:00
Oliver Schneider 208deac1c9
Reenable clippy 2017-11-30 16:12:24 +01:00
Alex Crichton a850bb0e5d Update bootstrap compiler
Also remove a number of `stage0` annotations and such
2017-11-29 21:11:20 -08:00
Aaron Hill 21228a82b0
Remove librustdoc dependency on env_logger
We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383
2017-11-29 18:10:42 -05:00
Nick Cameron 1cec22e157 Update Rustfmt again 2017-11-29 20:34:06 +13:00
Nick Cameron 02c89f703d Rebased Cargo.lock 2017-11-29 19:17:20 +13:00
Ariel Ben-Yehuda 3801c0594c update Cargo.lock & rustdoc
This is required because the old version depended on tendril 0.3.1,
which used `repr(packed)` incorrectly - see
https://github.com/kuchiki-rs/kuchiki/pull/38
2017-11-26 16:12:42 +02:00
bors 10ef344d8c Auto merge of #46011 - euclio:reachability-redux, r=nrc
Allow filtering analysis by reachability

Fixes #43521.
Fixes https://github.com/nrc/rls-analysis/issues/79.

This PR allows a user to filter items present in the save-analysis data by setting the `reachable_only` config option. This option is intended for use by the new rustdoc. The PR isn't quite finished, because it's dependent on a new release of rls-data, but I want to make sure that the approach is valid.

https://github.com/nrc/rls-analysis/issues/79 mentions that `pub use` might need to be handled, but my thinking is that the consumer of the analysis data would be able to infer which imports are `pub use`, and which items are only reachable through `pub use`, so that doesn't need to be handled here.

r? @nrc
2017-11-23 03:22:55 +00:00
bors 41e03c3c46 Auto merge of #45905 - alexcrichton:add-wasm-target, r=aturon
std: Add a new wasm32-unknown-unknown target

This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld.

Notable features of this target include:

* There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set.
* There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything.
* Very small wasm modules can be generated directly from Rust code using this target.
* Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc).
* Naturally, any `#[no_std]` crate should be 100% compatible with this new target.

This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker.

This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready".

### Building yourself

First you'll need to configure the build of LLVM and enable this target

```
$ ./configure --target=wasm32-unknown-unknown --set llvm.experimental-targets=WebAssembly
```

Next you'll want to remove any previously compiled LLVM as it needs to be rebuilt with WebAssembly support. You can do that with:

```
$ rm -rf build
```

And then you're good to go! A `./x.py build` should give you a rustc with the appropriate libstd target.

### Test support

Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is [still getting LLVM bugs fixed](https://reviews.llvm.org/D39866) to get that working and will take some time. Relatively simple programs all seem to work though!

In general I've only tested this with a local fork that makes use of LLVM 5 rather than our current LLVM 4 on master. The LLVM 4 WebAssembly backend AFAIK isn't broken per se but is likely missing bug fixes available on LLVM 5. I'm hoping though that we can decouple the LLVM 5 upgrade and adding this wasm target!

### But the modules generated are huge!

It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is:

    cargo install --git https://github.com/alexcrichton/wasm-gc
    wasm-gc foo.wasm bar.wasm

And then `bar.wasm` should be the smallest we can get it!

---

In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-11-20 08:29:46 +00:00
Alex Crichton 80ff0f74b0 std: Add a new wasm32-unknown-unknown target
This commit adds a new target to the compiler: wasm32-unknown-unknown. This
target is a reimagining of what it looks like to generate WebAssembly code from
Rust. Instead of using Emscripten which can bring with it a weighty runtime this
instead is a target which uses only the LLVM backend for WebAssembly and a
"custom linker" for now which will hopefully one day be direct calls to lld.

Notable features of this target include:

* There is zero runtime footprint. The target assumes nothing exists other than
  the wasm32 instruction set.
* There is zero toolchain footprint beyond adding the target. No custom linker
  is needed, rustc contains everything.
* Very small wasm modules can be generated directly from Rust code using this
  target.
* Most of the standard library is stubbed out to return an error, but anything
  related to allocation works (aka `HashMap`, `Vec`, etc).
* Naturally, any `#[no_std]` crate should be 100% compatible with this new
  target.

This target is currently somewhat janky due to how linking works. The "linking"
is currently unconditional whole program LTO (aka LLVM is being used as a
linker). Naturally that means compiling programs is pretty slow! Eventually
though this target should have a linker.

This target is also intended to be quite experimental. I'm hoping that this can
act as a catalyst for further experimentation in Rust with WebAssembly. Breaking
changes are very likely to land to this target, so it's not recommended to rely
on it in any critical capacity yet. We'll let you know when it's "production
ready".

---

Currently testing-wise this target is looking pretty good but isn't complete.
I've got almost the entire `run-pass` test suite working with this target (lots
of tests ignored, but many passing as well). The `core` test suite is still
getting LLVM bugs fixed to get that working and will take some time. Relatively
simple programs all seem to work though!

---

It's worth nothing that you may not immediately see the "smallest possible wasm
module" for the input you feed to rustc. For various reasons it's very difficult
to get rid of the final "bloat" in vanilla rustc (again, a real linker should
fix all this). For now what you'll have to do is:

    cargo install --git https://github.com/alexcrichton/wasm-gc
    wasm-gc foo.wasm bar.wasm

And then `bar.wasm` should be the smallest we can get it!

---

In any case for now I'd love feedback on this, particularly on the various
integration points if you've got better ideas of how to approach them!
2017-11-19 21:07:41 -08:00
Andy Russell d08a164960
upgrade rls-data 2017-11-19 23:19:15 -05:00
Marc-Antoine Perennou 90e54f4340 update openssl{,-sys} to fix build with libressl 2.6.x
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-11-17 20:40:25 +01:00
Oliver Schneider 5319203aa3
Reenable clippy testing 2017-11-15 10:42:47 +01:00
bors 4b6f7252a1 Auto merge of #45902 - nrc:component-update, r=alexcrichton
Update RLS and Rustfmt

r? @alexcrichton
2017-11-12 12:20:07 +00:00
kennytm 2c4a0a78b8 Rollup merge of #45783 - kennytm:compiler-test-fixes, r=alexcrichton
Miscellaneous changes for CI, Docker and compiletest.

This PR contains 7 independent commits that improves interaction with CI, Docker and compiletest.

1. a4e5c91cb8 — Forces a newline every 100 dots when testing in quiet mode. Prevents spurious timeouts when abusing the CI to test Android jobs.

2. 1b5aaf22e8 — Use vault.centos.org for dist-powerpc64le-linux, see #45744.

3. 33400fbbcd — Modify `src/ci/docker/run.sh` so that the docker images can be run from Docker Toolbox for Windows on Windows 7. I haven't checked the behavior of the newer Docker for Windows on Windows 10. Also, "can run" does not mean all the test can pass successfully (the UDP tests failed last time I checked)

4. d517668a08 — Don't emit a real warning the linker segfault, which affects UI tests like https://github.com/rust-lang/rust/pull/45489#issuecomment-340134944. Log it instead.

5. 51e2247948 — During run-pass, trim the output if stdout/stderr exceeds 416 KB (top 160 KB + bottom 256 KB). This is an attempt to avoid spurious failures like https://github.com/rust-lang/rust/pull/45384#issuecomment-341755788

6. 9cfdabaf3c — Force `gem update --system` before deploy. This is an attempt to prevent spurious error #44159.

7. eee10cc482 — Tries to print the crash log on macOS on failure. This is an attempt to debug #45230.
2017-11-10 17:07:04 +08:00
Nick Cameron 2afc039a5d Update RLS submodule 2017-11-10 17:53:46 +13:00
Nick Cameron 12da5a4b11 Update rustfmt submodule 2017-11-10 13:53:28 +13:00
Alex Crichton 6bc8f164b0 std: Remove `rand` crate and module
This commit removes the `rand` crate from the standard library facade as
well as the `__rand` module in the standard library. Neither of these
were used in any meaningful way in the standard library itself. The only
need for randomness in libstd is to initialize the thread-local keys of
a `HashMap`, and that unconditionally used `OsRng` defined in the
standard library anyway.

The cruft of the `rand` crate and the extra `rand` support in the
standard library makes libstd slightly more difficult to port to new
platforms, namely WebAssembly which doesn't have any randomness at all
(without interfacing with JS). The purpose of this commit is to clarify
and streamline randomness in libstd, focusing on how it's only required
in one location, hashmap seeds.

Note that the `rand` crate out of tree has almost always been a drop-in
replacement for the `rand` crate in-tree, so any usage (accidental or
purposeful) of the crate in-tree should switch to the `rand` crate on
crates.io. This then also has the further benefit of avoiding
duplication (mostly) between the two crates!
2017-11-08 20:41:17 -08:00
Robin Kruppe 0d6b52c2f3 Saturating casts between integers and floats (both directions).
This affects regular code generation as well as constant evaluation in trans,
but not the HIR constant evaluator because that one returns an error for
overflowing casts and NaN-to-int casts. That error is conservatively
correct and we should be careful to not accept more code in constant
expressions.
The changes to code generation are guarded by a new -Z flag, to be able
to evaluate the performance impact. The trans constant evaluation changes
are unconditional because they have no run time impact and don't affect
type checking either.
2017-11-07 20:13:19 +01:00
Dustin Speckhals d0c1f36771 tools: Fix rustfmt and the RLS
These tools have been corrected in their upstream repo's, and the
submodules have been updated here to reflect that. I also had to update
Cargo to match what the RLS is expecting.

The tool states for `rustfmt` and `rls` where both changed from "Broken"
to "Testing" in this commit, thus enabling testing and distribution
again.
2017-11-06 13:03:06 -05:00
bors 44990e5b14 Auto merge of #45770 - spastorino:newtype_index, r=nikomatsakis
Make last structs indexes definitions use newtype_index macro

This PR makes the last two index structs not using newtype_index macro to use it and also fixes this https://github.com/rust-lang/rust/issues/45763 issue.
2017-11-05 22:06:15 +00:00
kennytm 51e2247948
Abbreviate some stdout/stderr output in compiletest.
This is intended to prevent the spurious OOM error from
run-pass/rustc-rust-log.rs, by skipping the output in the middle when the
size is over 416 KB, so that the log output will not be overwhelmed.
2017-11-06 03:53:41 +08:00
bors 12e6b53744 Auto merge of #45711 - tirr-c:unicode-span, r=estebank
Display spans correctly when there are zero-width or wide characters

Hopefully...
* fixes #45211
* fixes #8706

---

Before:
```
error: invalid width `7` for integer literal
  --> unicode_2.rs:12:25
   |
12 |     let _ = ("a̐éö̲", 0u7);
   |                         ^^^
   |
   = help: valid widths are 8, 16, 32, 64 and 128

error: invalid width `42` for integer literal
  --> unicode_2.rs:13:20
   |
13 |     let _ = ("아あ", 1i42);
   |                    ^^^^
   |
   = help: valid widths are 8, 16, 32, 64 and 128

error: aborting due to 2 previous errors
```

After:
```
error: invalid width `7` for integer literal
  --> unicode_2.rs:12:25
   |
12 |     let _ = ("a̐éö̲", 0u7);
   |                     ^^^
   |
   = help: valid widths are 8, 16, 32, 64 and 128

error: invalid width `42` for integer literal
  --> unicode_2.rs:13:20
   |
13 |     let _ = ("아あ", 1i42);
   |                      ^^^^
   |
   = help: valid widths are 8, 16, 32, 64 and 128

error: aborting due to 2 previous errors
```

Spans might display incorrectly on the browser.

r? @estebank
2017-11-04 23:09:19 +00:00
Santiago Pastorino d19faead2d Make DefIndex use newtype_index macro 2017-11-04 19:22:37 -03:00
Wonwoo Choi 272c2faa1d Display spans correctly when there are non-half-width characters 2017-11-03 03:15:39 +09:00
bors 2379faa933 Auto merge of #45468 - Xanewok:crate-source, r=nrc
Emit crate disambiguators in save-analysis data

Needed for https://github.com/nrc/rls-analysis/issues/93.
Blocked by https://github.com/nrc/rls-data/pull/11. (For now, this pulls my branch [rls-data/crate-source](https://github.com/Xanewok/rls-data/tree/crate-source))

This will allow to disambiguate different crates types/versions when indexing resulting save-analysis data (most importantly allow to support bin+lib and different crate versions).

r? @nrc
2017-11-02 03:36:50 +00:00
Igor Matuszewski b4ffedee67 Update rls so it compiles with #45468 2017-11-01 00:48:26 +01:00
bors 90ef3372e8 Auto merge of #45597 - DSpeckhals:rustfmt-update, r=nrc
tools: Update rustfmt and re-enable testing

This allows rustfmt and the RLS to test and compile again.
2017-10-29 21:25:12 +00:00
Dustin Speckhals e3bf19d8d4 Update rustfmt again 2017-10-29 15:16:02 -04:00
Manish Goregaokar 84f1fc951d
Update clippy 2017-10-29 05:27:36 -04:00
Dustin Speckhals 1156455d42 Update rustfmt
This allows rustfmt and the RLS to test and compile again.
2017-10-28 13:46:43 -04:00
kennytm b644339a16 Rollup merge of #45421 - QuietMisdreavus:update-pulldown, r=steveklabnik
rustdoc: update pulldown + fix spurious rendering difference around footnotes

fixes #45420
2017-10-28 15:56:19 +08:00
Igor Matuszewski 45fa7b26e8 Use rls-data 0.12 2017-10-27 23:53:57 +02:00
bors d9f1249655 Auto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrum
Bump to 1.23 and update bootstrap

This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies
2017-10-27 18:00:32 +00:00
Alex Crichton ca18537197 Bump to 1.23 and update bootstrap
This commit updates the bootstrap compiler, bumps the version to 1.23, updates
Cargo, updates books, and updates crates.io dependencies
2017-10-26 13:59:18 -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
Michael Woerister 6fccd71f75 librustc_errors: Don't emit the same error message twice. 2017-10-25 15:01:06 +02:00
Dustin Speckhals bca47e42b2 Merge branch 'master' into update-rls-data-for-save-analysis 2017-10-24 19:37:15 -04:00
leonardo.yvens 19aa23b6d3 Remove deprecated `collections` crate.
This reverts commit 6484258f17.
2017-10-22 14:55:02 -02:00
bors 5481098274 Auto merge of #45423 - durka:update-jobserver, r=Mark-Simulacrum
update jobserver version to work around macos bug

Update `jobserver` crate to fix rust-lang/cargo#4643, a panic which can't happen according to `libc::poll`'s man page but was nevertheless reported on macOS 10.9 and 10.10.

r? @alexcrichton
2017-10-22 03:13:16 +00:00
QuietMisdreavus 4fdd6299b0 rustdoc: update pulldown renderer
fixes #45420
2017-10-21 13:27:06 -05:00
Corey Farwell c96db06e5b Rollup merge of #45411 - oli-obk:clippy, r=Manishearth
Reactivate clippy in toolstate.toml

The `Cargo.lock` changes are b/c clippy is not its own workspace anymore, but is part of the main workspace

r? @Manishearth
2017-10-21 09:47:23 -04:00
Dustin Speckhals 69ba6738eb Use newest version of RLS and rustfmt 2017-10-20 18:57:06 -04:00
Alex Burka ff0e9df152 update jobserver version to work around macos bug 2017-10-20 18:35:18 -04:00
Oliver Schneider 2812865664
Reactivate clippy in toolstate.toml 2017-10-20 16:01:30 +02:00
bjorn3 906523efea Move collector to rustc_trans_utils 2017-10-19 11:01:31 +02:00
bors fdec805d03 Auto merge of #45283 - alexcrichton:used-mut-nodes, r=arielb1
rustc: Remove `used_mut_nodes` from `TyCtxt`

This updates the borrowck query to return a result, and this result is then used
to incrementally check for unused mutable nodes given sets of all the used
mutable nodes.

Closes #42384
2017-10-16 03:02:05 +00:00
Vadim Petrochenkov 9e0fc5ccd0 rustbuild: Support specifying archiver and linker explicitly 2017-10-15 22:10:07 +03:00
bors 6c0d50f9fa Auto merge of #45224 - malbarbo:x32, r=alexcrichton
Add x86_64-unknown-linux-gnux32 target

This adds X32 ABI support for Linux on X86_64. Let's package and dist it so we can star testing libc, libstd, etc.

Fixes https://github.com/rust-lang/rfcs/issues/1339
2017-10-15 06:12:13 +00:00
Alex Crichton 4df1278c69 rustc: Remove `used_mut_nodes` from `TyCtxt`
This updates the borrowck query to return a result, and this result is then used
to incrementally check for unused mutable nodes given sets of all the used
mutable nodes.

Closes #42384
2017-10-14 09:29:02 -07:00
kennytm 81ea49f244
Rollup merge of #45049 - alexcrichton:update-jobserver, r=sfackler
Update the `jobserver` crate

Brings in a bugfix to be compatible with the master branch of `make` where
jobserver fds are set in nonblocking mode
2017-10-13 01:58:40 +08:00
Marco A L Barbosa 03419c846a Bump cc to 1.01 to include x86_64-unknown-linux-gnux32 support 2017-10-11 21:35:53 -03:00
Dustin Speckhals 218103ef5a Update rustfmt along with rls 2017-10-11 12:00:29 -04:00
Dustin Speckhals dcb915e774 Update rls submodule 2017-10-07 16:54:00 -04:00
Dustin Speckhals 57d0410f60 Update rls-data for librustc-save-analysis
0.10 -> 0.11

This will allow for more fine-grained save analysis for enum variants
(tuple and struct)
2017-10-07 16:12:51 -04:00
Alex Crichton 47fc913e56 Update the `jobserver` crate
Brings in a bugfix to be compatible with the master branch of `make` where
jobserver fds are set in nonblocking mode
2017-10-05 12:34:52 -07:00
Santiago Pastorino c8549a1586 Generate Idx in nll using newtype_index! 2017-10-04 23:50:53 -03:00
steveklabnik 1bbf41da6f update mdbook
Fixes #44704
2017-10-02 10:16:32 -04:00
est31 4114d68f18 Update the libcompiler_builtins submodule 2017-09-30 01:45:21 +02:00
Oliver Schneider ea35192d7c
Adjust imports to librustc::mir::interpret 2017-09-29 12:54:39 +02:00
Alex Crichton 7694ca419b Update to the `cc` crate
This is the name the `gcc` crate has moved to
2017-09-28 07:45:50 -07:00
Alex Crichton 041d3550f6 Update some minor dependencies 2017-09-27 15:40:57 -07:00
Nick Cameron 71a0be0792 Update the RLS again 2017-09-27 15:40:57 -07:00
Nick Cameron c5cad5a78d Update RLS and Rustfmt 2017-09-27 15:40:57 -07:00
bors 0e6f4cf51c Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
Initial support for `..=` syntax

#28237

This PR adds `..=` as a synonym for `...` in patterns and expressions.
Since `...` in expressions was never stable, we now issue a warning.

cc @durka
r? @aturon
2017-09-27 16:04:31 +00:00
Badel2 5102309b1f bump rustfmt 2017-09-26 20:57:13 +02:00
bjorn3 18005203e1 Remove now unused dependency on flate2 from rustc_driver 2017-09-23 15:27:54 +02:00
bjorn3 e130ccc54e Fix for upstream changes 2017-09-23 14:46:15 +02:00
bjorn3 d703552325 Merge rustc_trans_trait into rustc_trans_utils 2017-09-23 13:00:28 +02:00
bjorn3 9eeaba18bd Move NoLlvmMetadataLoader to rustc_trans_traits 2017-09-23 13:00:25 +02:00
bjorn3 44c184382f Add TransCrate trait 2017-09-23 12:59:46 +02:00
bjorn3 89af6d5c8b [WIP] Less hacky way of supporting dylibs 2017-09-23 12:58:19 +02:00
bjorn3 cba53f0be5 Allow writing metadata without llvm 2017-09-23 12:54:53 +02:00
Vadim Petrochenkov 419069d984 Use recorded types in rustc_privacy 2017-09-23 00:50:46 +03:00
Tamir Duberstein 231d9e7e5d
Remove rustc_bitflags; use the bitflags crate 2017-09-17 14:19:24 -04:00
Tim Neumann eea2f5596a Rollup merge of #44533 - nrc:rustfmt-submod, r=alexcrichton
Add Rustfmt

r? @alexcrichton
2017-09-17 13:19:04 +02:00
Alex Crichton a47ca2291d Rollup merge of #44606 - alexcrichton:update-cmake, r=Mark-Simulacrum
rustbuild: Update `cmake` dependency

Should help suppress some warnings from various repos as `cmake` in the newest
version disables warnings by default.
2017-09-16 17:09:41 -07:00
Alex Crichton 941e172fc1 Rollup merge of #44531 - QuietMisdreavus:bump-gcc, r=alexcrichton
bump gcc for bootstrap

On Windows, the gcc crate would send /Wall to msvc, which would cause
builds to get flooded with warnings, exploding compile times from one
hour to more than 72! The gcc crate version 0.3.54 changes this behavior
to send /W4 instead, which greatly cuts down on cl.exe flooding the
command prompt window with warnings.
2017-09-16 17:09:37 -07:00
bors ae8efdc87d Auto merge of #43017 - durka:stabilize-const-invocation, r=eddyb
Individualize feature gates for const fn invocation

This PR changes the meaning of `#![feature(const_fn)]` so it is only required to declare a const fn but not to call one. Based on discussion at #24111. I was hoping we could have an FCP here in order to move that conversation forward.

This sets the stage for future stabilization of the constness of several functions in the standard library (listed below), so could someone please tag the lang team for review.

- `std::cell`
    - `Cell::new`
    - `RefCell::new`
    - `UnsafeCell::new`
- `std::mem`
    - `size_of`
    - `align_of`
- `std::ptr`
    - `null`
    - `null_mut`
- `std::sync`
    - `atomic`
        - `Atomic{Bool,Ptr,Isize,Usize}::new`
    - `once`
        - `Once::new`
- primitives
    - `{integer}::min_value`
    - `{integer}::max_value`

Some other functions are const but they are also unstable or hidden, e.g. `Unique::new` so they don't have to be considered at this time.

After this stabilization, the following `*_INIT` constants in the standard library can be deprecated. I wasn't sure whether to include those deprecations in the current PR.

- `std::sync`
    - `atomic`
        - `ATOMIC_{BOOL,ISIZE,USIZE}_INIT`
    - `once`
        - `ONCE_INIT`
2017-09-16 17:02:17 +00:00
Alex Burka 332c38cd70 bump rls 2017-09-16 15:53:02 +00:00
Alex Crichton 6fdadaaa96 rustbuild: Update `cmake` dependency
Should help suppress some warnings from various repos as `cmake` in the newest
version disables warnings by default.
2017-09-15 09:37:52 -07:00
Corey Farwell 5255ab7e2a Rollup merge of #44430 - steveklabnik:update-mdbook, r=alexcrichton
update mdbook

This eliminates some warnings

r? @alexcrichton
2017-09-14 22:32:37 -04:00
Nick Cameron d0070e85db Build and test Rustfmt 2017-09-13 16:18:45 +12:00
Alex Crichton 921750b8ac rustc: Make `CrateStore` private to `TyCtxt`
This commit removes the `cstore_untracked` method, making the `CrateStore` trait
object entirely private to the `ty/context.rs` module.
2017-09-12 21:14:06 -07:00
QuietMisdreavus 81ebab6fca bump gcc for bootstrap
On Windows, the gcc crate would send /Wall to msvc, which would cause
builds to get flooded with warnings, exploding compile times from one
hour to more than 72! The gcc crate version 0.3.54 changes this behavior
to send /W4 instead, which greatly cuts down on cl.exe flooding the
command prompt window with warnings.
2017-09-12 18:09:26 -05:00
steveklabnik f3d6f120e8 update mdbook 2017-09-11 11:56:35 -04:00
Alex Crichton 38bedfabb9 rustbuild: Switch back to using hard links
The `copy` function historically in rustbuild used hard links to speed up the
copy operations that it does. This logic was backed out, however, in #39518 due
to a bug that only showed up on Windows, described in #39504. The cause
described in #39504 happened because Cargo, on a fresh build, would overwrite
the previous artifacts with new hard links that Cargo itself manages.

This behavior in Cargo was fixed in rust-lang/cargo#4390 where it no longer
should overwrite files on fresh builds, opportunistically leaving the filesystem
intact and not touching it.

Hopefully this can help speed up local builds by doing fewer copies all over the
place!
2017-09-09 21:14:44 -07:00
bors 3681220877 Auto merge of #43975 - RalfJung:gcc, r=alexcrichton
use gcc::Build rather than deprecated gcc::Config

I did `cargo update -p gcc` to upgrade only this package. Is there further process that should be follwoed when updating a build dependency from crates.io?

r? @alexcrichton
Fixes #43973
2017-09-06 19:28:36 +00:00
bors 5e9431a6f5 Auto merge of #44176 - nrc:update-rls, r=alexcrichton
Update rls

And expose the `CFG_VERSION` env var to tools so they can determine the version of Rust.

This gets the RLS back on master and so completes the PR dance for the generators PR.

r? @alexcrichton
2017-09-03 00:51:47 +00:00