Commit Graph

91925 Commits

Author SHA1 Message Date
John Kåre Alsaker
b70124ed47 Don't require a C compiler on wasm32 2019-04-10 21:17:32 +02:00
John Kåre Alsaker
81a1121341 Update cmake, cc and compiler_builtins for VS 2019 support 2019-04-10 21:17:31 +02:00
bors
96d700f1b7 Auto merge of #59810 - matthiaskrgr:submodule_upd, r=oli-obk
submodules: update clippy, rls and miri

Let's give this another try.
r? @Manishearth
cc @Xanewok
2019-04-10 15:54:39 +00:00
Matthias Krüger
beeeb4360e update Cargo.lock 2019-04-09 10:50:08 +02:00
Matthias Krüger
956e815659 submodules: update rls from 90f7ab0 to 49efc06
Changes:
````
Account for changed format range in a test
Adapt format integration test to use new range
Add unit tests for Rustfmt::calc_text_edits
Prefer saturating_sub
Return only partial text edits on formatting request
Redo errors in format.rs
Rephrase unstable features helper function
Work around Rustfmt bug
Adjust range-formatting test
Update Rustfmt to 1.2
Allow unstable features under "dev" channel
Updated clippy_lints in to rev c81e43b92c to fix build breaking
Fix lint pass API changes
Remove a redundant import
Bump Clippy
Add more helpful compiler messages when the features are improperly specified
Silence some flaky tests.
Update Cargo.
Rename read_analysis to decode_buf
Update Clippy
Fix pointer to pointer silliness
Add serde implementation to complement rustc-serialize
````
2019-04-09 10:49:44 +02:00
Matthias Krüger
e3993c701c submodules: update miri from 0e4f963 to 28f2e5b
Changes:
````
Update src/fn_call.rs
Fix calloc test
Add calloc test
Tidy up calloc code
Update compiletest
Fix tagging order
Add `calloc`
rename MIRI_TARGET -> MIRI_COMPILETEST_TARGET to clarify that this affects compiletest only
compiletest can just propagate MIRI_SYSROOT from the outside
````
2019-04-09 10:49:39 +02:00
Matthias Krüger
1c0922069e submodules: update clippy from 92612c9d to 37f5c1ec
Changes:
````
Remove force-host and explain no-prefer-dynamic
Escape a single quote in single_char_pattern hint
cargo fmt
Re-add tmp feature to compiletest
Remove libtest from deps
Re-allow clippy::identity_conversion in compiletest
Use latest compiletest-rs
Revert tests/compile-test.rs to 61aa5c957c
Fix ICE in suspicious_else_formatting
use a multispan for MANY_SINGLE_CHAR_NAMES
Add missing `// run-pass` annotations to ICE tests
Remove clippy_dev as dev-dependency
NFC: fix typos
rustup https://github.com/rust-lang/rust/pull/59657
Add TransmutingNull Lint * Late Lint pass, catches:   * One liner: 0 -> null -> transmute   * One liner: std:null() -> transmute   * Const (which resolves to null) -> transmute * UI Test case for Lint * Updated test for issue 3849, because now the lint that code generated is in Clippy. * Expanded `const.rs` miri-based Constant Folding code, to cover   raw pointers
Run rustfmt
Set level of identity_conversion FP to warn
Rustup to https://github.com/rust-lang/rust/pull/58805
rustup 41316f0449
Updated source to match with recent rustc `master` toolchain changes
Fix dogfood error of question_mark lint fix
Fix question_mark lint+test
use `span_lint_and_sugg` in `explicit_counter_loop`
Fix some test failures
Hacky rustup
run cargo fmt
rustup https://github.com/rust-lang/rust/pull/59096/
Change explicit_counter_loop's message to add parentheses if necessary
Change explicit_counter_loop's message to reflect original variable name
cargo fmt
Add rustfix tests for mistyped_literal_suffix lint
Move some `unreadable_literal` ui tests to correct file
Add implementation for the EarlyLintPass trait into the Adding Lints documentation.
Add rust-toolchain for clippy_dev
````
2019-04-09 10:49:33 +02:00
bors
3750348daf Auto merge of #59724 - oli-obk:const_arg_ice, r=eddyb
Function arguments should never get promoted

fixes https://github.com/rust-lang/rust/issues/59469
2019-04-08 01:18:12 +00:00
Oliver Scherer
01e83943f9 Only run SIMD tests on x86 2019-04-07 21:46:39 +02:00
bors
474e7a6486 Auto merge of #59765 - lzutao:patch-1, r=Centril
Add reference to cfg attr

r? @QuietMisdreavus
2019-04-07 18:06:01 +00:00
bors
11510b27b5 Auto merge of #59766 - xales:revertlibtest, r=Manishearth
Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"

This reverts commit 3eb4890dfe, reversing
changes made to 7a4df3b53d.

This is, as best I can tell, a clean revert of #57842. It retains some interim changes, like moving `black_box`, and otherwise brings libtest back in as it was before removal.
2019-04-07 15:23:49 +00:00
bors
df7a91f192 Auto merge of #59770 - pietroalbini:pin-android-emulator, r=kennytm
ci: pin android emulator to 28.0.23

Apparently Android Emulator 28.0.25 (the latest one) is broken for us, and `sdkmanager` doesn't have a way to pin a package to a specific version. This PR stops downloading the emulator from `sdkmanager`, downloading it manually instead.

Tested this locally and confirmed it works. I'll open an issue on Google's issue tracker later today.

Fixes https://github.com/rust-lang/rust/issues/59757
r? @kennytm
2019-04-07 12:33:01 +00:00
Pietro Albini
d13547a1c6
ci: pin android emulator to 28.0.23 2019-04-07 13:52:33 +02:00
bors
4fb888bf04 Auto merge of #59119 - cramertj:cx-back, r=withoutboats
Future-proof the Futures API

cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs

r? @withoutboats
2019-04-07 09:48:12 +00:00
Jacob Greenfield
28ea249ab5
Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"
This reverts commit 3eb4890dfe, reversing
changes made to 7a4df3b53d.
2019-04-07 03:16:31 -04:00
Oliver Scherer
54ea7f726e Update comment 2019-04-07 08:02:48 +02:00
Oliver Scherer
65a45dd99d Add more regression tests for accidental promotion 2019-04-07 08:02:48 +02:00
Oliver Scherer
1f40580f62 Function arguments should never get promoted 2019-04-07 08:02:48 +02:00
lzutao
cd9bea3317
Add reference to cfg attr 2019-04-07 11:48:14 +07:00
bors
dec0a98c4b Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelix
More restrictive 2 phase borrows - take 2

Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow.

(pnkfelix updated description)

cc #56254 , #59159

blocks PR #59114

r? @pnkfelix

cc @RalfJung @nikomatsakis
2019-04-07 00:57:13 +00:00
bors
091380021a Auto merge of #59760 - Centril:rollup-4b9x7ue, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59738 (Move match_path from DefId to lint::LateContext)
 - #59740 (Use for_each to extend collections)
 - #59751 (Tiny docs fix)
 - #59754 (Update books)
 - #59755 (Update miri)

Failed merges:

r? @ghost
2019-04-06 21:34:12 +00:00
Mazdak Farrokhzad
4601ff017f
Rollup merge of #59755 - matthewjasper:update-miri, r=RalfJung
Update miri

r? @RalfJung
2019-04-06 22:52:49 +02:00
Mazdak Farrokhzad
cd1165dcf3
Rollup merge of #59754 - ehuss:update-books, r=frewsxcv
Update books

## nomicon

1 commits in f1ff93b66844493a7b03101c7df66ac958c62418..c02e0e7754a76886e55b976a3a4fac20100cd35d
2019-02-26 13:37:28 -0500 to 2019-03-25 16:52:56 -0400
- dropck: The drop order is now defined (rust-lang-nursery/nomicon#113)

## reference

3 commits in 27ad493a10364e907ec476e2ad61e8a1614b57e1..98f90ff4de8e588f651f0fb493b5c7496551cd59
2019-03-26 02:06:15 +0100 to 2019-04-06 09:29:08 -0700
- Document repr packed(N). (rust-lang-nursery/reference#553)
- Fix broken link in glossary. (rust-lang-nursery/reference#558)
- Typo fixes (rust-lang-nursery/reference#556)

## embedded-book

2 commits in 07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a..7989c723607ef5b13b57208022259e6c771e11d0
2019-03-27 15:40:52 +0000 to 2019-04-04 12:14:37 +0000
- fix rust-embedded/book#182  (rust-embedded/book#183)
- Add openocd to list of installable packages  (rust-embedded/book#179)
2019-04-06 22:52:48 +02:00
Mazdak Farrokhzad
39d7292ef1
Rollup merge of #59751 - tbu-:pr_doc_fix_format, r=Centril
Tiny docs fix
2019-04-06 22:52:47 +02:00
Mazdak Farrokhzad
76d818cf73
Rollup merge of #59740 - cuviper:folded-extend, r=scottmcm
Use for_each to extend collections

This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.

Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.
2019-04-06 22:52:46 +02:00
Mazdak Farrokhzad
ed45788e53
Rollup merge of #59738 - flip1995:match_path_move, r=eddyb,Manishearth
Move match_path from DefId to lint::LateContext

cc https://github.com/rust-lang/rust/pull/59316#discussion_r272351353

r? @eddyb
2019-04-06 22:52:45 +02:00
Matthew Jasper
acfe36e2e9 Update miri 2019-04-06 21:50:18 +01:00
Eric Huss
965dc6b74b Update books 2019-04-06 10:06:51 -07:00
Tobias Bucher
564771fa23 Tiny docs fix 2019-04-06 17:27:00 +02:00
bors
8159f389f6 Auto merge of #59710 - alexcrichton:llvm-9-compat, r=sanxiyn
rustc: Start implementing compat with LLVM 9

This commit doesn't actually migrate to LLVM 9, but it brings our own
C++ bindings in line with LLVM 9 and able to compile against tip of
tree. The changes made were:

* The `MainSubprogram` flag for debuginfo moved between flag types.
* Iteration of archive members was tweaked slightly and we have to
  construct the two iterators before constructing the returned
  `RustArchiveIterator` value.
* The `getOrInsertFunction` binding now returns a wrapper which we use
  `getCallee()` on to get the value we're interested in.
2019-04-06 13:14:23 +00:00
bors
209b0b41ac Auto merge of #59745 - cwhakes:master, r=sanxiyn
Change `copytest` parameter name from `y` to `sign`

This should help clarify ambiguity with whether `a.copysign(b)` applies the sign of `a` to `b` or `b` to `a`.

r? @Centril
2019-04-06 10:03:38 +00:00
bors
2982dbf855 Auto merge of #59744 - cuviper:output-errors, r=sanxiyn
Show better errors for LLVM IR output

I was trying to output LLVM IR directly to the console:

    $ rustc hello.rs --emit=llvm-ir -o /dev/stdout
    LLVM ERROR: IO failure on output stream: Bad file descriptor

Now `LLVMRustPrintModule` returns an error, and we print:

    error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied

... which is more informative.
2019-04-06 07:21:41 +00:00
bors
b025802a24 Auto merge of #59723 - Zoxc:rem-noforce, r=michaelwoerister
Remove no_force from coherent_trait

r? @michaelwoerister
2019-04-06 04:14:13 +00:00
Will Hakes
350e492bc0 Change copytest parameter name from y to sign 2019-04-05 20:30:45 -06:00
Josh Stone
aafe2c6da9 Show better errors for LLVM IR output
I was trying to output LLVM IR directly to the console:

    $ rustc hello.rs --emit=llvm-ir -o /dev/stdout
    LLVM ERROR: IO failure on output stream: Bad file descriptor

Now `LLVMRustPrintModule` returns an error, and we print:

    error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied

... which is more informative.
2019-04-05 17:48:23 -07:00
bors
05b4554e77 Auto merge of #59741 - Centril:rollup-3us4b8q, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #58894 (Fix invalid bounds string generation in rustdoc)
 - #59599 (Updated RELEASES.md for 1.34.0)
 - #59624 (SGX target: Use linker option to avoid code CGU assignment kludge)
 - #59696 (Remove invalid assertion back:🔗:from add_upstream_rust_crates().)
 - #59707 (Add missing tryfrom example)
 - #59727 (wasi: Use shared API for preopened fds)

Failed merges:

r? @ghost
2019-04-05 22:56:15 +00:00
Mazdak Farrokhzad
8455818b31
Rollup merge of #59727 - alexcrichton:wasi-apis, r=fitzgen
wasi: Use shared API for preopened fds

This commit updates the wasi target with supported added in
CraneStation/wasi-sysroot#10. That function allows both C and Rust to
cooperate in how preopened files are managed, enabling us to learn about
propened files through the same interface. The `open_parent` function in
the wasi `fs` module was updated to avoid its own initialization of a
global preopened map and instead delegate to libc to perform this
functionality.

This should both be more robust into the future in terms of handling
path logic as well as ensuring the propened map is correctly set up at
process boot time. This does currently require some unfortunate
allocations on our side, but if that becomes an issue we can always
paper over those in time!
2019-04-06 00:14:47 +02:00
Mazdak Farrokhzad
c065367ca0
Rollup merge of #59707 - GuillaumeGomez:GuillaumeGomez-patch-1, r=Centril
Add missing tryfrom example

r? @rust-lang/docs
2019-04-06 00:14:46 +02:00
Mazdak Farrokhzad
f3f6898719
Rollup merge of #59696 - michaelwoerister:fix-issue-59137, r=alexcrichton
Remove invalid assertion back:🔗:from add_upstream_rust_crates().

This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not.

Fixes #59137

r? @alexcrichton
2019-04-06 00:14:44 +02:00
Mazdak Farrokhzad
6c7ec18e33
Rollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichton
SGX target: Use linker option to avoid code CGU assignment kludge

cc @VardhanThigle @faern
2019-04-06 00:14:43 +02:00
Mazdak Farrokhzad
2b90d67320
Rollup merge of #59599 - XAMPPRocky:master, r=Mark-Simulacrum
Updated RELEASES.md for 1.34.0

[Rendered](https://github.com/XAMPPRocky/rust/blob/master/RELEASES.md)

This also corrects an omission in the previous 1.33.0 release.

r? @Mark-Simulacrum

cc @rust-lang/release
2019-04-06 00:14:41 +02:00
Mazdak Farrokhzad
e5435d97ea
Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebank
Fix invalid bounds string generation in rustdoc

Fixes #58737.

Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain).

Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct...

r? @QuietMisdreavus
2019-04-06 00:14:40 +02:00
Taylor Cramer
1691e06db6 Future-proof the Futures API 2019-04-05 15:03:33 -07:00
Josh Stone
0730a01c5c Use for_each to extend collections
This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.

Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.
2019-04-05 14:51:07 -07:00
flip1995
278ab1905c
Move match_path from DefId to lint::LateContext 2019-04-05 23:04:56 +02:00
bors
acd8dd6a50 Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertj
Unsized rvalues: implement boxed closure impls. (2nd try)

This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
2019-04-05 17:45:43 +00:00
Mazdak Farrokhzad
4ba3034140
Update RELEASES.md
Co-Authored-By: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2019-04-05 19:38:24 +02:00
Alex Crichton
bb2c0d1839 wasi: Use shared API for preopened fds
This commit updates the wasi target with supported added in
CraneStation/wasi-sysroot#10. That function allows both C and Rust to
cooperate in how preopened files are managed, enabling us to learn about
propened files through the same interface. The `open_parent` function in
the wasi `fs` module was updated to avoid its own initialization of a
global preopened map and instead delegate to libc to perform this
functionality.

This should both be more robust into the future in terms of handling
path logic as well as ensuring the propened map is correctly set up at
process boot time. This does currently require some unfortunate
allocations on our side, but if that becomes an issue we can always
paper over those in time!
2019-04-05 09:13:46 -07:00
Guillaume Gomez
c386210714 Add missing tryfrom example 2019-04-05 17:38:25 +02:00
Alex Crichton
d5985bc9ec rustc: Start implementing compat with LLVM 9
This commit doesn't actually migrate to LLVM 9, but it brings our own
C++ bindings in line with LLVM 9 and able to compile against tip of
tree. The changes made were:

* The `MainSubprogram` flag for debuginfo moved between flag types.
* Iteration of archive members was tweaked slightly and we have to
  construct the two iterators before constructing the returned
  `RustArchiveIterator` value.
* The `getOrInsertFunction` binding now returns a wrapper which we use
  `getCallee()` on to get the value we're interested in.
2019-04-05 08:10:18 -07:00