Commit Graph

98845 Commits

Author SHA1 Message Date
Alex Crichton
b88bcf0f9d Update bundled OpenSSL to 1.1.1d
Brings in a few minor security fixes to the distributed Cargo/etc.
2019-09-11 06:55:40 -07:00
bors
74d5c70b17 Auto merge of #64369 - Centril:rollup-g875ozi, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #64060 (Improve hygiene of `alloc::format!`)
 - #64072 (Replace file_stem by file_name in rustdoc markdown)
 - #64129 (vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn)
 - #64188 (rustc: Allow the cdylib crate type with wasm32-wasi)
 - #64326 (Fixed documentation within c_str::from_ptr)
 - #64349 (documentation for AtomicPtr CAS operations)

Failed merges:

r? @ghost
2019-09-11 00:39:40 +00:00
Mazdak Farrokhzad
4f1d50e65f
Rollup merge of #64349 - arnohaase:pr_documentation_atomicptr, r=cramertj
documentation for AtomicPtr CAS operations

The examples in the documentation for AtomicPtr CAS operations only show code that does *not* perform the CAS operation. I suggest to change them so that they actually do exchange the AtomicPtr's value.
2019-09-11 02:38:10 +02:00
Mazdak Farrokhzad
57df63ce7d
Rollup merge of #64326 - hman523:master, r=joshtriplett
Fixed documentation within c_str::from_ptr

Fixed the documentation issue mentioned in #63590
2019-09-11 02:38:09 +02:00
Mazdak Farrokhzad
751aec8b47
Rollup merge of #64188 - alexcrichton:wasi-cdylib, r=varkor
rustc: Allow the cdylib crate type with wasm32-wasi

The wasm32-wasi target respects configuration around `crt-static` in
general, but is defaulted to being static. This interacted badly with
code which validated the `cdylib` crate type for `wasm32-wasi`,
erroneously saying that the `cdylib` crate type wasn't supported on
`wasm32-wasi` by default. This commit sets the appropriate flag in
`wasm32_wasi`'s target specification to indicate that the `cdylib` crate
type is supported regardless of `crt-static`

Closes #64187
2019-09-11 02:38:07 +02:00
Mazdak Farrokhzad
34f38d9809
Rollup merge of #64129 - Wind-River:master_003, r=alexcrichton
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn

vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn

r? @alexcrichton
cc @n-salim
2019-09-11 02:38:06 +02:00
Mazdak Farrokhzad
ec06633e19
Rollup merge of #64072 - limira:patch-1, r=ollie27
Replace file_stem by file_name in rustdoc markdown

Before this PR, a file name like `some.file.md` will be output to a file named `some.html` with is not correct because the expected output file must be `some.file.html`
2019-09-11 02:38:04 +02:00
Mazdak Farrokhzad
e757d33e73
Rollup merge of #64060 - petrochenkov:unstdhyg, r=tmandry
Improve hygiene of `alloc::format!`

`format` now uses `format_args` though a `__export` module, as described in https://github.com/rust-lang/rust/issues/63687#issuecomment-526254208.

Fixes https://github.com/rust-lang/rust/issues/63687
2019-09-11 02:38:03 +02:00
Baoshan
665291cfa3
Merge pull request #19 from Wind-River/min_stack_size
remove Copyright notic
2019-09-10 13:39:12 -07:00
Baoshan Pang
5318f98c06 remove Copyright notic 2019-09-10 09:25:22 -07:00
bors
34e82a7b79 Auto merge of #64354 - Centril:rollup-oaq0xoi, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #63786 (Make `abs`, `wrapping_abs`, `overflowing_abs` const functions)
 - #63989 (Add Yaah to clippy toolstain notification list)
 - #64256 (test/c-variadic: Fix patterns on powerpc64)
 - #64292 (lowering: extend temporary lifetimes around await)
 - #64311 (lldb: avoid mixing "Hit breakpoint" message with other output.)
 - #64330 (Clarify E0507 to note Fn/FnMut relationship to borrowing)
 - #64331 (Changed instant is earlier to instant is later)
 - #64344 (rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly.)

Failed merges:

r? @ghost
2019-09-10 16:19:48 +00:00
Mazdak Farrokhzad
8d2ef194a1
Rollup merge of #64344 - eddyb:mir-opt-stop-shouting-at-the-kernel, r=oli-obk
rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly.

This brings `mir-opt` tests from `197s` (over 3 minutes!) to `2.85s`, on my build server.
That's a nice speedup of about `69x` and so it definitely fixes #58485, for me.

It's such a beginner mistake I feel like maybe `clippy` should lint against it?
(cc @Manishearth @oli-obk)
2019-09-10 17:19:31 +02:00
Mazdak Farrokhzad
26a4af9743
Rollup merge of #64331 - hman523:fix-64322, r=varkor
Changed instant is earlier to instant is later

Fixed the documentation issue from #64322
2019-09-10 17:19:29 +02:00
Mazdak Farrokhzad
35c24b4019
Rollup merge of #64330 - Mark-Simulacrum:clarify-E0507, r=GuillaumeGomez
Clarify E0507 to note Fn/FnMut relationship to borrowing

Fixes #37904.
2019-09-10 17:19:28 +02:00
Mazdak Farrokhzad
ce3e824399
Rollup merge of #64311 - eddyb:lldb-python3, r=michaelwoerister
lldb: avoid mixing "Hit breakpoint" message with other output.

This is to get `src/test/debuginfo/lexical-scopes-in-block-expression.rs` working.
It used to work like a week ago, and the main change that happened was I switched from Python 2 to Python 3 (I don't remember why, but I did get rid of the build dir entirely, and it fixed something else).

The error was:
```
error: line not found in debugger output: [...]$27 = 10
```

Relevant part of the output:
```
print val
(long) $26 = 15
print ten
(long) $27 = 10 Hit breakpoint 15.1: where = a`lexical_scopes_in_block_expression::main::hcdd5c3caa9166e73 + 1223 at lexical-scopes-in-block-expression.rs:504:4, address = 0x00005555555556e7, resolved, hit count = 1
Hit breakpoint 16.1: where = a`lexical_scopes_in_block_expression::main::hcdd5c3caa9166e73 + 631 at lexical-scopes-in-block-expression.rs:510:8, address = 0x0000555555555497, resolved, hit count = 1
```

There are most `print` commands and their outputs before, and more `Hit breakpoint` messages afterwards, so I assume what happens is the `Hit breakpoint` messages should be interleaved but somehow they ended up being buffered after all of the other output.

As a stopgap measure I'm adding a newline before each `Hit breakpoint` so they don't end up on the same line as the last `print` output (which breaks our pattern-matching).

r? @michaelwoerister
2019-09-10 17:19:26 +02:00
Mazdak Farrokhzad
a1755dfbc7
Rollup merge of #64292 - davidtwco:issue-63832-await-temporary-lifetimes, r=matthewjasper
lowering: extend temporary lifetimes around await

Fixes #63832.

r? @matthewjasper
cc @nikomatsakis
2019-09-10 17:19:25 +02:00
Mazdak Farrokhzad
347b5c89f5
Rollup merge of #64256 - smaeul:patch/powerpc64-tests, r=alexcrichton
test/c-variadic: Fix patterns on powerpc64

On architectures such as powerpc64 that use extend_integer_width_to in
their C ABI processing, integer parameters shorter than the native
register width will be annotated with the ArgAttribute::SExt or
ArgAttribute::ZExt attribute, and that attribute will be included in the
generated LLVM IR.

In this test, all relevant parameters are `i32`, which will get the
`signext` annotation on the relevant 64-bit architectures. Match both
the annotated and non-annotated case, but enforce that the annotation is
applied consistently.
2019-09-10 17:19:23 +02:00
Mazdak Farrokhzad
9eecb4aafe
Rollup merge of #63989 - yaahc:master, r=Manishearth
Add Yaah to clippy toolstain notification list
2019-09-10 17:19:22 +02:00
Mazdak Farrokhzad
13726cc444
Rollup merge of #63786 - tspiteri:const-abs, r=alexcrichton
Make `abs`, `wrapping_abs`, `overflowing_abs` const functions

This makes `abs`, `wrapping_abs` and `overflowing_abs` const functions like #58044 makes `wrapping_neg` and `overflowing_neg` const functions.

`abs` is made const by returning `(self ^ -1) - -1` = `!self + 1` = `-self` for negative numbers and `(self ^ 0) - 0` = `self` for non-negative numbers. The subexpression `self >> ($BITS - 1)` evaluates to `-1` for negative numbers and `0` otherwise. The subtraction overflows when `self` is `min_value()`, as we would be subtracting `max_value() - -1`; this is when `abs` should overflow.

`wrapping_abs` and `overflowing_abs` make use of `wrapping_sub` and `overflowing_sub` instead of the subtraction operator.
2019-09-10 17:19:19 +02:00
bors
87b0c9036f Auto merge of #60387 - Goirad:test-expansion, r=ollie27
Allow cross-compiling doctests

This PR allows doctest to receive a --runtool argument, as well as possibly many --runtool-arg arguments, which are then used to run cross compiled doctests.
Also, functionality has been added to rustdoc to allow it to skip testing doctests on a per-target basis, in the same way that compiletest does it. For example, tagging the doctest with "ignore-sgx" disables testing on any targets that contain "sgx". A plain "ignore" still skips testing on all targets.

See [here](https://github.com/rust-lang/cargo/pull/6892) for the companion PR in the cargo project that extends functionality in Cargo so that it passes the appropriate parameters to rustdoc when cross compiling and testing doctests.

Part of [#6460](https://github.com/rust-lang/cargo/issues/6460)
2019-09-10 12:19:41 +00:00
Arno Haase
7ad44c7c9c documentation for AtomicPtr CAS operations 2019-09-10 14:18:16 +02:00
Eduard-Mihai Burtescu
1e7faef220 rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly. 2019-09-10 13:43:54 +03:00
David Wood
63fad69a99
lowering: extend temporary lifetimes around await
This commit changes the HIR lowering around `await` so that temporary
lifetimes are extended. Previously, await was lowered as:

```rust
{
    let mut pinned = future;
    loop {
        match ::std::future::poll_with_tls_context(unsafe {
            <::std::pin::Pin>::new_unchecked(&mut pinned)
        }) {
            ::std::task::Poll::Ready(result) => break result,
            ::std::task::Poll::Pending => {}
        }
        yield ();
    }
}
```

With this commit, await is lowered as:

```rust
match future {
    mut pinned => loop {
        match ::std::future::poll_with_tls_context(unsafe {
            <::std::pin::Pin>::new_unchecked(&mut pinned)
        }) {
            ::std::task::Poll::Ready(result) => break result,
            ::std::task::Poll::Pending => {}
        }
        yield ();
    }
}
```

However, this change has the following side-effects:

- All temporaries in future will be considered to live across a
  yield for the purpose of auto-traits.
- Borrowed temporaries in future are likely to be considered to be live
  across the yield for the purpose of the generator transform.

Signed-off-by: David Wood <david@davidtw.co>
2019-09-10 11:27:57 +01:00
bors
403c0def90 Auto merge of #64329 - Mark-Simulacrum:rustdoc-log, r=GuillaumeGomez
Switch rustdoc logging to RUSTDOC_LOG

This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG).

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

r? @GuillaumeGomez
2019-09-10 08:31:53 +00:00
bors
61dced1827 Auto merge of #64333 - Centril:rollup-llhhr82, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #64307 (Update clippy)
 - #64308 (Update miri submodule)
 - #64318 (update reference)
 - #64323 (Always show backtrace on Fuchsia)

Failed merges:

r? @ghost
2019-09-10 04:30:32 +00:00
Mazdak Farrokhzad
59156af1e7
Rollup merge of #64323 - cramertj:fuchsia-rust-backtrace-noop, r=alexcrichton
Always show backtrace on Fuchsia

r? @alexcrichton

cc @jakeehrlich
2019-09-10 06:29:50 +02:00
Mazdak Farrokhzad
8dc16e8722
Rollup merge of #64318 - RalfJung:reference, r=ehuss
update reference

r? @Centril
2019-09-10 06:29:49 +02:00
Mazdak Farrokhzad
c5a2e14771
Rollup merge of #64308 - oli-obk:miri, r=oli-obk
Update miri submodule

fixes #64244
2019-09-10 06:29:47 +02:00
Mazdak Farrokhzad
55f067b1b5
Rollup merge of #64307 - lzutao:clippy-up, r=oli-obk
Update clippy

Closes #64215

r? @Manishearth
cc @oli-obk
2019-09-10 06:29:46 +02:00
hman523
79263afb3e Changed instant is earlier to instant is later 2019-09-09 21:19:01 -05:00
Samuel Holland
2f6e73cb07 test/c-variadic: Fix patterns on powerpc64
On architectures such as powerpc64 that use extend_integer_width_to in
their C ABI processing, integer parameters shorter than the native
register width will be annotated with the ArgAttribute::SExt or
ArgAttribute::ZExt attribute, and that attribute will be included in the
generated LLVM IR.

In this test, all relevant parameters are `i32`, which will get the
`signext` annotation on the relevant 64-bit architectures. Match both
the annotated and non-annotated case, but enforce that the annotation is
applied consistently.
2019-09-09 21:05:52 -05:00
Mark Rousskov
6eb7b69834 Clarify E0507 to note Fn/FnMut relationship to borrowing 2019-09-09 21:34:24 -04:00
Mark Rousskov
007a58d4ce Switch rustdoc logging to RUSTDOC_LOG
This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG).
2019-09-09 21:25:49 -04:00
hman523
9b1456e4c5
Update added backticks around a function call
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-09 20:09:17 -05:00
bors
122fefc63e Auto merge of #64321 - Centril:rollup-jsj5tpl, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #63806 (Upgrade rand to 0.7)
 - #64054 (Always emit unresolved import errors and hide unused import lint)
 - #64279 (Bump RLS and Rustfmt submodules to use rustc-ap-* v583)
 - #64317 (Update LLVM submodule)
 - #64320 (Update version of `rustc-std-workspace-*` crates)

Failed merges:

r? @ghost
2019-09-10 00:34:30 +00:00
hman523
bdfab2049c Fixed documentation within c_str::from_ptr 2019-09-09 18:50:11 -05:00
Taylor Cramer
7eb42c9838 Always show backtrace on Fuchsia 2019-09-09 16:23:03 -07:00
Mazdak Farrokhzad
342722e584
Rollup merge of #64320 - alexcrichton:update-patch, r=RalfJung
Update version of `rustc-std-workspace-*` crates

This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 22:18:14 +02:00
Mazdak Farrokhzad
7b0d1342b5
Rollup merge of #64317 - nikic:bump-llvm-3, r=alexcrichton
Update LLVM submodule

Updates the LLVM submodule to current LLVM 9 HEAD.

Fixes #63918.
Fixes #63791.

r? @alexcrichton
2019-09-09 22:18:12 +02:00
Mazdak Farrokhzad
f353d49edd
Rollup merge of #64279 - Xanewok:bump-rustc-ap, r=tmandry
Bump RLS and Rustfmt submodules to use rustc-ap-* v583

Closes #64180
Closes #64179

r? @topecongiro
2019-09-09 22:18:11 +02:00
Mazdak Farrokhzad
8926301d11
Rollup merge of #64054 - estebank:unused-import-is-to-eager, r=petrochenkov
Always emit unresolved import errors and hide unused import lint

Fix https://github.com/rust-lang/rust/issues/63724.

r? @petrochenkov
2019-09-09 22:18:10 +02:00
Mazdak Farrokhzad
611458ba06
Rollup merge of #63806 - mati865:rand, r=alexcrichton
Upgrade rand to 0.7

Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
2019-09-09 22:18:08 +02:00
Alex Crichton
6c74bc9518 Update version of rustc-std-workspace-* crates
This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 13:02:10 -07:00
Ralf Jung
4dd60f3114 update reference 2019-09-09 20:48:57 +02:00
Nikita Popov
69d503038e Update LLVM submodule 2019-09-09 20:32:03 +02:00
bors
0b36e9dea3 Auto merge of #64313 - Centril:rollup-7w8b67g, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #63468 (Resolve attributes in several places)
 - #64121 (Override `StepBy::{try_fold, try_rfold}`)
 - #64278 (check git in bootstrap.py)
 - #64306 (Fix typo in config.toml.example)
 - #64312 (Unify escape usage)

Failed merges:

r? @ghost
2019-09-09 16:33:43 +00:00
Igor Matuszewski
c2249a4bf9 cargo update -p rustfmt-nightly 2019-09-09 18:18:21 +02:00
Igor Matuszewski
91dae2e233 Bump RLS and Rustfmt submodules 2019-09-09 18:18:03 +02:00
Eduard-Mihai Burtescu
625a9d6a4b lldb: avoid mixing "Hit breakpoint" message with other output. 2019-09-09 19:00:08 +03:00
Mazdak Farrokhzad
f7ee13040b
Rollup merge of #64312 - GuillaumeGomez:rustdoc-better-esc-handling, r=Mark-Simulacrum
Unify escape usage

Fixes #63443.

I chose to keep the search text when pressing escape so when we focus on the search bar, we got the results again without needing to load them again. I also unified a bit a few things (maybe I should have done it in another commit, sorry...).

r? @Mark-Simulacrum
2019-09-09 17:42:29 +02:00