Commit Graph

109607 Commits

Author SHA1 Message Date
Eric Huss
722d3d8ef0 Update books. 2020-03-31 11:53:48 -07:00
Pietro Albini
824dcd424f
ci: disable cancel-outdated-builds for the try branch
While for auto, try and PR builds we only want the latest commit to be
tested, that's not true for try builds: each commit pushed to the branch
is a different PR being tested, and we want multiple PRs to be tested in
parallel if there is enough demand.

Fixes #70569
2020-03-31 19:49:36 +02:00
Santiago Pastorino
6a95bf884f
Use Place directly on Operand::place and friends, it's Copy 2020-03-31 14:45:07 -03:00
Santiago Pastorino
890b39381f
Use Place directly, it's Copy even more use cases 2020-03-31 14:45:05 -03:00
Santiago Pastorino
25528c1e28
Use Place directly, it's Copy more use cases 2020-03-31 14:44:01 -03:00
Santiago Pastorino
760bca4f5b
Use Place directly on check_mut_borrowing_layout_constrained_field, it's Copy 2020-03-31 14:44:00 -03:00
Santiago Pastorino
32a761809b
Use Place directly on remove_never_initialized_mut_locals, it's Copy 2020-03-31 14:43:58 -03:00
Santiago Pastorino
a67b28a96e
Use Place directly on borrow_of_local_data, it's Copy 2020-03-31 14:42:21 -03:00
Santiago Pastorino
f026441e32
Use Place directly on propagate_closure_used_mut_place, it's Copy 2020-03-31 14:42:21 -03:00
Santiago Pastorino
d45dca390c
Use Place directly, it's Copy 2020-03-31 14:42:20 -03:00
Dylan DPC
011c0906cd
Rollup merge of #70623 - rcoh:patch-2, r=jonas-schievink
Fix broken link in README

Crate name for rustc entry point docs changed. Fixes #70603
2020-03-31 19:29:36 +02:00
Dylan DPC
59809bc4c1
Rollup merge of #70614 - RalfJung:cons-prop-reloc, r=wesleywiser
remove unnecessary relocation check in const_prop

Unnecessary as per https://github.com/rust-lang/rust/issues/70356#issuecomment-606615292

Fixes https://github.com/rust-lang/rust/issues/70356
r? @oli-obk Cc @wesleywiser
2020-03-31 19:29:35 +02:00
Dylan DPC
6248b59316
Rollup merge of #70606 - GuillaumeGomez:cleanup-e0466, r=Dylan-DPC
Clean up E0466 explanation

r? @Dylan-DPC
2020-03-31 19:29:33 +02:00
Dylan DPC
b9546075ac
Rollup merge of #70600 - danielframpton:aarch64-windows-tests, r=alexcrichton
Ensure there are versions of test code for aarch64 windows

Remove the `cfg` flags that were preventing some tests from running on `aarch64-pc-windows-msvc`.

All the existing `target_os = windows` targets had the same `align()` and `size()` values, so this change just removes the `target_arch` flags.

r? @alexcrichton
2020-03-31 19:29:31 +02:00
Dylan DPC
0203ad2195
Rollup merge of #70268 - tmiasko:sanitizer-docs, r=steveklabnik
Document ThreadSanitizer in unstable-book
2020-03-31 19:29:29 +02:00
Dylan DPC
3e31006f3c
Rollup merge of #69458 - Luro02:master, r=GuillaumeGomez,ollie27
improve folder name for persistent doc tests

This fixes #69411, by using the entire path as folder name and storing already visited paths in a HashMap + appending a number to the file name for duplicates.
2020-03-31 19:29:28 +02:00
Dylan DPC
f62cfa76c5
Rollup merge of #69425 - lcnr:make_contiguous, r=Amanieu
add fn make_contiguous to VecDeque

Adds the following method to VecDeque:

```rust
pub fn make_contiguous(&mut self) -> &mut [T];
```

Taken from https://github.com/rust-lang/rust/pull/69400, after a suggestion by @CryZe https://github.com/rust-lang/rust/pull/69400#issuecomment-590216089

I am in favor of merging this instead of https://github.com/rust-lang/rust/pull/69400.
2020-03-31 19:29:26 +02:00
Pietro Albini
0110634c83
cargotest: remove webrender
The current webrender commit occasionally fails without a reason, and
the latest webrender commit is missing a dependency on our Windows
builders. It's not worth installing an extra dependency for cargotest,
and the spurious failure makes keeping this test not worth it.
2020-03-31 19:28:06 +02:00
Bastian Kauschke
bab327c725 update unused_braces wording 2020-03-31 19:01:49 +02:00
Bastian Kauschke
bcf35b1d80 add tests for unused_braces 2020-03-31 19:01:49 +02:00
Bastian Kauschke
698b20eeda update tests 2020-03-31 19:01:49 +02:00
Bastian Kauschke
21c5ccab10 fix internal lint fallout 2020-03-31 19:01:48 +02:00
Russell Cohen
7eb3e9a8a8
Fix broken link in README
Crate name for rustc entry point docs changed. Fixes #70603
2020-03-31 12:57:31 -04:00
Ralf Jung
96deb950ac const backtrace: do not skip first frame 2020-03-31 17:58:14 +02:00
Ralf Jung
ad74480cb2 avoid an unreachable fallback 2020-03-31 17:58:14 +02:00
Bastian Kauschke
e1afd26c52 fix docs 2020-03-31 16:50:06 +02:00
Russell Cohen
55a5eea763 Fix tests to handle debug_assert 2020-03-31 10:27:07 -04:00
Michael Woerister
408e6e3dbd Add a test case for incremental + codegen-units interaction. 2020-03-31 16:23:28 +02:00
Michael Woerister
1e5b4594e1 Make the rustc respect the -C codegen-units flag in incremental mode.
Before this commit `-C codegen-units` would just get silently be
ignored if `-C incremental` was specified too. After this commit
one can control the number of codegen units generated during
incremental compilation. The default is rather high at 256, so most
crates won't see a difference unless explicitly opting into a lower
count.
2020-03-31 16:11:16 +02:00
bors
75ff3110ac Auto merge of #70617 - Centril:rollup-063ycso, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #69784 (Optimize strip_prefix and strip_suffix with str patterns)
 - #70548 (Add long error code for error E0226)
 - #70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery)
 - #70561 (remove obsolete comment)
 - #70562 (infer array len from pattern)
 - #70585 (std: Fix over-aligned allocations on wasm32-wasi)
 - #70587 (Add `Rust` to the code snippet)
 - #70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`)
 - #70613 (more clippy fixes)

Failed merges:

r? @ghost
2020-03-31 14:00:55 +00:00
Mazdak Farrokhzad
976f8d59dd
Rollup merge of #70613 - matthiaskrgr:cl5ppy_squashed, r=Centril
more clippy fixes

* use is_empty() instead of len comparison (clippy::len_zero)
* use if let instead of while let loop that never loops (clippy::never_loop)
* remove redundant returns (clippy::needless_return)
* remove redundant closures (clippy::redundant_closure)
* use if let instead of match and wildcard pattern (clippy::single_match)
* don't repeat field names redundantly (clippy::redundant_field_names)

r? @Centril
2020-03-31 15:59:52 +02:00
Mazdak Farrokhzad
4aeeb81db5
Rollup merge of #70588 - Coder-256:str-split-at-docs, r=Dylan-DPC
Fix incorrect documentation for `str::{split_at, split_at_mut}`

The documentation for each method currently states:

> Panics if `mid` is not on a UTF-8 code point boundary, or if it is beyond the last code point of the string slice.

However, this is not consistent with the real behavior, or that of the corresponding methods for `[T]` slices. A comment inside each of the `str` methods states:

> is_char_boundary checks that the index is in [0, .len()]

That is what I would expect the behavior to be, and in fact this seems to be the real behavior. For example ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8e03dcc209d4dd176df2297523f9fee1)):

```rust
fn main() {
    // Prints ("abc", "") and doesn't panic
    println!("{:?}", "abc".split_at(3));
}
```

In this case, I would interpret "the last code point of the string slice" to mean the byte at index 2 in UTF-8. However, it is possible to pass an index of 3, which is definitely "beyond the last code point of the string slice".

I think that this is much clearer, but feel free to bikeshed.
2020-03-31 15:59:50 +02:00
Mazdak Farrokhzad
c55f5007b2
Rollup merge of #70587 - DutchGhost:patch-1, r=Dylan-DPC
Add `Rust` to the code snippet

Adds `Rust` to the snippet where the code causing the ICE should be placed, so github can render it as Rust code rather than plain code.
2020-03-31 15:59:49 +02:00
Mazdak Farrokhzad
cd4d1c7f6d
Rollup merge of #70585 - alexcrichton:fix-wasi-align-alloc, r=Mark-Simulacrum
std: Fix over-aligned allocations on wasm32-wasi

The wasm32-wasi target delegates its malloc implementation to the
functions in wasi-libc, but the invocation of `aligned_alloc` was
incorrect by passing the number of bytes requested first rather than the
alignment. This commit swaps the order of these two arguments to ensure
that we allocate over-aligned memory correctly.
2020-03-31 15:59:47 +02:00
Mazdak Farrokhzad
3ef70fe156
Rollup merge of #70562 - lcnr:const-arr_len, r=Centril
infer array len from pattern

closes #70529

This still errors in the following case

```rust
#![feature(const_generics)]
fn arr<const N: usize>() -> [u8; N] {
    todo!()
}

fn main() {
    match arr() {
        [5, ..] => (),
        //~^ ERROR cannot pattern-match on an array without a fixed length
        [_, _] => (),
    }
}
```
Considering that this should be rare and is harder to implement I would merge this PR without *fixing* the above.
2020-03-31 15:59:46 +02:00
Mazdak Farrokhzad
38cd294ed5
Rollup merge of #70561 - tshepang:obsolete-comment, r=petrochenkov
remove obsolete comment

Made obsolete by b5e35b128e
2020-03-31 15:59:44 +02:00
Mazdak Farrokhzad
65b85a571e
Rollup merge of #70555 - Centril:fix-70549, r=petrochenkov
resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery

Fixes #70549

r? @petrochenkov
2020-03-31 15:59:43 +02:00
Mazdak Farrokhzad
cbe3266c65
Rollup merge of #70548 - Ersikan:master, r=GuillaumeGomez
Add long error code for error E0226

Added a long description message for error E0226, which previously did not exist.
As requested in issue #61137

r? @GuillaumeGomez
2020-03-31 15:59:41 +02:00
Mazdak Farrokhzad
9ee373fd94
Rollup merge of #69784 - benesch:fast-strip-prefix-suffix, r=kennytm
Optimize strip_prefix and strip_suffix with str patterns

As mentioned in https://github.com/rust-lang/rust/issues/67302#issuecomment-585639226.
I'm not sure whether adding these methods to `Pattern` is desirable—but they have default implementations so the change is backwards compatible. Plus it seems like they're slated for wholesale replacement soon anyway? #56345

----

Constructing a Searcher in strip_prefix and strip_suffix is
unnecessarily slow when the pattern is a fixed-length string. Add
strip_prefix and strip_suffix methods to the Pattern trait, and add
optimized implementations of these methods in the str implementation.
The old implementation is retained as the default for these methods.
2020-03-31 15:59:40 +02:00
Ana-Maria Mihalache
f259470da3 rustc_target::abi: rename FieldPlacement to FieldsShape. 2020-03-31 13:44:52 +00:00
Bastian Kauschke
b5223d2725 update VecDeque::as_(mut)_slice docs 2020-03-31 15:39:56 +02:00
Ralf Jung
afe1ffb190 remove unnecessary relocation check in const_prop 2020-03-31 15:27:45 +02:00
Matthias Krüger
08f2904dfa more clippy fixes
use is_empty() instead of len comparison (clippy::len_zero)
use if let instead of while let loop that never loops (clippy::never_loop)
remove redundant returns (clippy::needless_return)
remove redundant closures (clippy::redundant_closure)
use if let instead of match and wildcard pattern (clippy::single_match)
don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-31 15:20:05 +02:00
Guillaume Gomez
194a3718ab Clean up E0466 explanation 2020-03-31 13:55:58 +02:00
Luro02
2e40ac7961
improve folder name for persistent doc tests 2020-03-31 13:47:37 +02:00
Amanieu d'Antras
1ae3b5022b Add missing -lmsvcrt on mingw after -lpthread
Fixes #70316
2020-03-31 12:27:09 +01:00
Ralf Jung
6073c7745e bump Miri 2020-03-31 09:16:59 +02:00
Ben Wolsieffer
55bdb61b48 Deduplicate crosstool-ng.sh 2020-03-30 20:09:45 -04:00
Josh Stone
6067315d58 Ensure LLVM is in the link path for "fulldeps" tests
This is a follow-up to #70123, which added `llvm-config --libdir` to the
`LIBRARY_PATH` for rustc tools. We need the same for "run-make-fulldeps"
and "ui-fulldeps" tests which depend on compiler libraries, implicitly
needing to link to `-lLLVM` as well.
2020-03-30 15:40:56 -07:00
Wesley Wiser
097e9e528f Add can_unwind field to FnAbi
This is a pure refactoring with no behavior changes.
2020-03-30 17:54:06 -04:00