Commit Graph

102523 Commits

Author SHA1 Message Date
Ross MacArthur
bc26f58521
Do not use "nil" to refer to () 2020-04-05 14:30:13 +02:00
Matthias Krüger
04a38e7e1b submodules: update clippy from 326b2204 to 7907abea
Changes:
````
Rustup to rust-lang/rust#70634
Update clippy_lints/src/types.rs
Update types.rs
Update types.rs
Improve docs for option_option
useless Rc<Rc<T>>, Rc<Box<T>>, Rc<&T>, Box<&T>
Allow let_underscore
Update option_option ui test
Test for ignoring let_underscore_must_use
Downgrade option_option to pedantic
````

Fixes #70709
2020-04-05 13:50:21 +02:00
Stefan Lankes
935683bd9c Simplify dtor registration for HermitCore by using a list of destructors
The implementation is similiar to macOS solution doesn't
depend on additional OS support
2020-04-05 13:41:17 +02:00
Amanieu d'Antras
7365748c0c Keep track of position when deleting from a BTreeMap
This improves the performance of drain_filter and is needed for
future Cursor support for BTreeMap.
2020-04-05 12:18:46 +01:00
Dylan DPC
31b8d65803
Rollup merge of #70806 - RalfJung:miri-assignment-check, r=eddyb
fix Miri assignment sanity check

Thanks @eddyb for pointing me to the right APIs!

r? @eddyb
Fixes https://github.com/rust-lang/rust/issues/70804
2020-04-05 13:13:14 +02:00
Dylan DPC
c185c4fe47
Rollup merge of #70776 - RalfJung:raw-vec, r=Dylan-DPC,TimDiekmann
clarify comment in RawVec::into_box

On first reading I almost thought "len <= cap" would be all that there is to check here. Expand the comment to clarify that that is not the case.
2020-04-05 13:13:13 +02:00
Dylan DPC
2448a23554
Rollup merge of #70769 - RalfJung:fixed, r=Dylan-DPC
Miri: remove an outdated FIXME

We even [have a test ](49dc2f9f09/src/test/ui/consts/miri_unleashed/drop.rs) making sure that we detect dropping with a non-const implementation.

r? @oli-obk
2020-04-05 13:13:11 +02:00
Dylan DPC
6f595e8713
Rollup merge of #70760 - PonasKovas:docs, r=Dylan-DPC
docs: make the description of Result::map_or more clear

The documentation of [`Result::map_or`](https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or) is very unclear and confusing, probably because it was copied straight from [`Option::map_or`](https://doc.rust-lang.org/std/option/enum.Option.html#method.map_or) and someone forgot to adapt it for Result.
2020-04-05 13:13:10 +02:00
Dylan DPC
7e4ed72d64
Rollup merge of #70558 - RalfJung:vec-extend-aliasing, r=Amanieu
Fix some aliasing issues in Vec

`Vec::extend` and `Vec::truncate` invalidated references into the vector even without reallocation, because they (implicitly) created a mutable reference covering the *entire* initialized part of the vector.

Fixes https://github.com/rust-lang/rust/issues/70301
I verified the fix by adding some new tests here that I ran in Miri.
2020-04-05 13:13:08 +02:00
Linus Färnstrand
28c9231a91 Make libcore float constant examples similar to libstd 2020-04-05 12:20:27 +02:00
Linus Färnstrand
daf8afdc85 Remove more std::f32 imports in libstd 2020-04-05 12:20:27 +02:00
Ralf Jung
e52a451913 fix comment 2020-04-05 12:11:33 +02:00
Ralf Jung
6cbe1726a7 clarify safety in RawVec::into_box 2020-04-05 12:09:03 +02:00
Ralf Jung
315a3b96a4 add test 2020-04-05 11:56:02 +02:00
Ralf Jung
05a5895f0d miri assignment check: compare types after normalizing all late-bound regions away 2020-04-05 11:55:52 +02:00
bors
607b858236 Auto merge of #70803 - arlosi:hash-regression, r=eddyb
Fix performance regression in debuginfo file_metadata.

Fixes performance regression caused by #69718.

Finding the `SourceFile` associated with a `FileName` called `get_source_file` on the `SourceMap`, which does a linear search through all files in the `SourceMap`.

This resolves the issue by passing the `SourceFile` in from the caller (which already had it available) instead of the `FileName`

Fixes #70785.
2020-04-05 09:50:30 +00:00
Linus Färnstrand
d06b26fb6c Stop importing the float modules. Use assoc consts 2020-04-05 11:30:25 +02:00
Linus Färnstrand
101085ad9f Stop importing integer modules in libstd 2020-04-05 11:22:01 +02:00
Linus Färnstrand
d0fc5d9e6b Stop importing int module in float parse test 2020-04-05 11:22:01 +02:00
Linus Färnstrand
d7f8928efd Stop importing int modules in librustdoc 2020-04-05 11:22:01 +02:00
Linus Färnstrand
bc8d6c1b33 Stop importing int/float modules in libserialize 2020-04-05 11:22:01 +02:00
Linus Färnstrand
fcf45999f7 Stop importing int/float modules in librustc_* 2020-04-05 11:22:01 +02:00
Linus Färnstrand
a88b36b93b Stop importing int/float modules in libcore 2020-04-05 11:22:01 +02:00
Linus Färnstrand
fff4f08398 Stop importing integer modules in liballoc 2020-04-05 11:22:01 +02:00
Arlo Siemsen
4cdceda5a3 Fix performance regression in debuginfo file_metadata.
Finding the `SourceFile` associated with a `FileName` called `get_source_file` on
the `SourceMap`, which does a linear search through all files in the `SourceMap`.

This resolves the issue by passing the SourceFile in from the caller (which already
had it available).
2020-04-05 01:43:44 -07:00
Ralf Jung
7e81c11aa8 tweak swap_remove 2020-04-05 08:40:40 +02:00
Aaron Hill
63d6ef65af
Query-ify Instance::resolve 2020-04-05 01:21:36 -04:00
Dylan DPC
5c42fafaf9
Rollup merge of #70783 - tshepang:deleted-types, r=Xanewok
comment refers to removed type

Was removed in 51938c61f6
2020-04-05 06:44:50 +02:00
Dylan DPC
d0dda18bd1
Rollup merge of #70768 - petrochenkov:macambig, r=Centril,mark-i-m
macro_rules: `NtLifetime` cannot start with an identifier

Fixes https://github.com/rust-lang/rust/issues/70446
2020-04-05 06:44:48 +02:00
Dylan DPC
590cb8b3b0
Rollup merge of #70766 - tspiteri:forget-to-ManuallyDrop, r=Mark-Simulacrum,RalfJung
use ManuallyDrop instead of forget inside collections

This PR changes some usage of `mem::forget` into `mem::ManuallyDrop` in some `Vec`, `VecDeque`, `BTreeMap` and `Box` methods.

Before the commit, the generated IR for some of the methods was longer, and even after optimization, some unwinding artifacts were still present.
2020-04-05 06:44:47 +02:00
Dylan DPC
6ea27010b5
Rollup merge of #70752 - yoshuawuyts:slice_fill, r=dtolnay
Add slice::fill

Adds the `slice::fill` method to fill a slice with an item. This replaces manual for loops where items are copied one-by-one. This is a counterpart to C++20's [`std::fill`](https://en.cppreference.com/w/cpp/algorithm/fill) function.

## Usage

```rust
let mut buf = vec![0; 10];
buf.fill(1);
assert_eq!(buf, vec![1; 10]);
```

## Performance

When compiling in release mode, for `[u8]` and `[u16]` this method will optimize to a `memset(3)` call ([godbolt](https://godbolt.org/z/85El_c)). The initial implementation relies on LLVM's optimizer to make it as fast as possible for any given input. But as @jonas-schievink [pointed out](https://twitter.com/sheevink/status/1245756597453885442) this can later be optimized through specialization to guarantee it has a specific performance profile.

## Why now?

Conversations about adding `slice::fill` are not new. In fact, https://github.com/rust-lang/rfcs/issues/2067 was opened 3 years ago about this exact topic. However discussion stranded while discussing implementation details, and it's not seen much forward motion since.

In ["The Hunt for the Fastest Zero"](https://travisdowns.github.io/blog/2020/01/20/zero.html) Travis Downs provides disects C++'s `std::fill` performance profile on gcc, comparing it among others to `memset(3)`. Even though `memset(3)` outperforms `std::fill` in their tests, the author notes the following:

>  That the optimization fails, perhaps unexpectedly, in some cases is unfortunate but it’s nice that you can fix it yourself. [...] Do we throw out modern C++ idioms, at least where performance matters, for example by replacing std::fill with memset? I don’t think so.

Much of the article focuses on how how to fix the performance of `std::fill` by providing specializations for specific input. In Rust we don't have any dedicated methods to fill slices with values, so it either needs to be optimized at the MIR layer, or more likely rely on LLVM's optimizer.

By adding a dedicated method for filling slices with values it opens up the ability for us to in the future guarantee that e.g. `Vec<u8>` will always optimize to `memset` even in debug mode. Or perhaps provide stronger guarantees about memory when zeroing values when a certain flag is passed. But regardless of that, it improves general ergonomics of working with slices by providing a dedicated method with documentation and examples.

## References
- [slice-fill prototype on docs.rs](https://docs.rs/slice-fill/1.0.1/slice_fill/)
- [The Hunt For The Fastest Zero](https://travisdowns.github.io/blog/2020/01/20/zero.html)
- [Safe memset for slices](https://github.com/rust-lang/rfcs/issues/2067)
- [C++20 std::fill](https://en.cppreference.com/w/cpp/algorithm/fill)
- [ASM output on Godbolt](https://godbolt.org/z/5-XU66)
2020-04-05 06:44:45 +02:00
Dylan DPC
630414db42
Rollup merge of #70748 - ogoffart:enum-layout-optim2, r=eddyb
Do not disable field reordering on enums with big discriminant

The field are always re-ordered to minimize padding, regardless of the
alignment of the discriminant

(spinoff from #70477)
2020-04-05 06:44:44 +02:00
Dylan DPC
9baba3476b
Rollup merge of #70635 - petrochenkov:nodefault, r=nagisa
rustc_target: Some cleanup to `no_default_libraries`
2020-04-05 06:44:42 +02:00
Yoshua Wuyts
edabceb4a3 Add slice::fill 2020-04-05 01:44:02 +02:00
Igor Matuszewski
370be8e02b rustc-workspace-hack: Account for upgraded crossbeam-utils 0.7 2020-04-05 00:45:50 +02:00
Igor Matuszewski
2f48af09c6 tidy: Update rustc-ap-syntax to -rustc_ast 2020-04-05 00:45:50 +02:00
Igor Matuszewski
b2561c9ea2 submodules: Update RLS and Rustfmt to 1.4.13 2020-04-05 00:45:50 +02:00
Vadim Petrochenkov
13bd25e472 Do not lose or reorder user-provided linker arguments 2020-04-04 22:01:18 +03:00
Tshepang Lekhonkhobe
636076a89e comment refers to removed type
Was removed in 51938c61f6
2020-04-04 20:30:09 +02:00
bors
853c4774e2 Auto merge of #69898 - spastorino:rename-rustc-guide2, r=Xanewok
Move rustc-guide submodule to rustc-dev-guide

r? @pietroalbini
2020-04-04 18:17:14 +00:00
Igor Matuszewski
dcf70044de
Update src/tools/publish_toolstate.py
Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
2020-04-04 20:11:01 +02:00
Stefan Lankes
e2780b3919
Merge branch 'master' into abi 2020-04-04 16:19:40 +02:00
Ralf Jung
e901b2ff8e Miri: remove an outdated FIXME 2020-04-04 15:55:32 +02:00
Vadim Petrochenkov
106b30e869 macro_rules: NtLifetime cannot start with an identifier 2020-04-04 16:23:43 +03:00
Vadim Petrochenkov
cd79400da7 rustc_target: Rely on default value of no_default_libraries more 2020-04-04 15:43:02 +03:00
Trevor Spiteri
2b718e8d9c use ManuallyDrop instead of forget inside collections
This commit changes some usage of mem::forget into mem::ManuallyDrop
in some Vec, VecDeque, BTreeMap and Box methods.

Before the commit, the generated IR for some of the methods was
longer, and even after optimization, some unwinding artifacts were
still present.
2020-04-04 14:30:33 +02:00
Ponas
b4f416d837 docs: make the description of Result::map_or more clear 2020-04-04 14:18:02 +03:00
bors
49dc2f9f09 Auto merge of #70272 - eddyb:type-of-impl-trait, r=nikomatsakis
typeck/type_of: let wfcheck handle generics in opaque types' substs.

I was working on #70164, and `type_of`'s handling of opaque types seemed to be, by far, the trickiest use of `Ty::walk`, but I believe it wasn't doing anything (see https://github.com/rust-lang/rust/pull/57896#discussion_r396064431 - I suspect, based on glancing at the PR discussion, that an early attempt was kept in, despite becoming just an overcomplicated way to do exactly the same as the previous simple type equality check).

I would've loved to remove `ResolvedOpaqueTy` (keep the `Ty` and lose the `Substs`), but it looks like the MIR borrowck part of the process needs that now, so it would've been added anyway since #57896, even if that PR hadn't happened.

<hr/>

In the process, I've moved the remaining substitution validation to `wfcheck`, which was already handling lifetimes, and kept only `delay_span_bug`s in `type_of`, as an insurance policy.

I've added tests for lifetime and const cases, they seem to be checked correctly now.
(and more uniform than they were in https://github.com/rust-lang/rust/issues/63063#issuecomment-602162804)

However, the quality of the errors is maybe a bit worse, and they don't trigger when there are other errors (not sure if this is due to compilation stop points or something more specific to one opaque type).

r? @nikomatsakis cc @matthewjasper @oli-obk @Aaron1011
2020-04-04 09:16:19 +00:00
bors
1b521f5773 Auto merge of #70136 - hermitcore:network_tcp, r=dtolnay
add basic IP support in HermitCore

- add initial version to support sockets
- use TcpStream as test case
- HermitCore uses smoltcp as IP stack for pure Rust applications
- further functionalities (e.g. UDP support) will be added step by step
- in principle, the current PR is a revision of #69404
2020-04-04 06:04:32 +00:00
Stefan Lankes
aa223304dc
Merge branch 'master' into abi 2020-04-04 07:41:05 +02:00
Eduard-Mihai Burtescu
8ad149a0e0 typeck/type_of: only early-bound and (free) late-bound lifetimes are parameters. 2020-04-04 08:29:06 +03:00
Eduard-Mihai Burtescu
ea7999b4f3 tests: add tests for lifetime and const params of opaque types. 2020-04-04 08:29:06 +03:00
Eduard-Mihai Burtescu
8807b00dd8 typeck/type_of: let wfcheck handle duplicate generics in opaque types' substs. 2020-04-04 08:29:06 +03:00
Eduard-Mihai Burtescu
8e9a5d928a typeck/type_of: let wfcheck handle concrete types in opaque types' substs. 2020-04-04 08:20:58 +03:00
Eduard-Mihai Burtescu
a98b5340d1 typeck/type_of: don't ignore incorrect defining uses of opaque types. 2020-04-04 08:00:26 +03:00
Eduard-Mihai Burtescu
6465113852 typeck/type_of: simplify checking of opaque types with multipler defining uses. 2020-04-04 06:49:20 +03:00
bors
6050e523ba Auto merge of #69718 - arlosi:debughash, r=eddyb
Add hash of source files in debug info

LLVM supports placing the hash of source files inside the debug info.
This information can be used by a debugger to verify that the source code matches
the executable.

This change adds support for both hash algorithms supported by LLVM, MD5 and SHA1, controlled by a target option.

* DWARF only supports MD5
* LLVM IR supports MD5 and SHA1 (and SHA256 in LLVM 11).
* CodeView (.PDB) supports MD5, SHA1, and SHA256.

Fixes #68980.

Tracking issue: #70401

rustc dev guide PR with further details: https://github.com/rust-lang/rustc-dev-guide/pull/623
2020-04-04 03:00:47 +00:00
bors
9e55101bb6 Auto merge of #70156 - michaelwoerister:incr-cgus, r=nikomatsakis
Make the rustc respect the `-C codegen-units` flag in incremental mode.

This PR implements (the as of yet unapproved) major change proposal at https://github.com/rust-lang/compiler-team/issues/245. See the description there for background and rationale.

The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point.

r? @nikomatsakis cc @pnkfelix
2020-04-03 23:50:01 +00:00
Olivier Goffart
6b6cb7bda7 Do not disable field reordering on enums with big discriminant
The field are always re-ordered to minimize padding, regardless of the
alignment of the discriminant
2020-04-03 23:12:39 +02:00
Mazdak Farrokhzad
4c41ea36cd
Rollup merge of #70741 - DutchGhost:test-59023, r=Centril
Add test for #59023

Adds a test for https://github.com/rust-lang/rust/issues/59023

Closes https://github.com/rust-lang/rust/issues/59023
2020-04-03 22:55:16 +02:00
Mazdak Farrokhzad
0f56ccdb34
Rollup merge of #70735 - GuillaumeGomez:cleanup-e0502, r=Dylan-DPC
Clean up E0502 explanation

r? @Dylan-DPC
2020-04-03 22:55:14 +02:00
Mazdak Farrokhzad
80690b0418
Rollup merge of #70720 - ecstatic-morse:issue-70637, r=oli-obk
Place TLS initializers with relocations in .tdata

Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE?

Also adds more context to the FIXME.

r? @oli-obk
2020-04-03 22:55:12 +02:00
Mazdak Farrokhzad
aa42d12d16
Rollup merge of #70707 - ecstatic-morse:dataflow-graphviz-cleanup, r=nikomatsakis
Remove unused graphviz emitter

This was only used by the old dataflow framework that was removed in #69644.
2020-04-03 22:55:10 +02:00
Mazdak Farrokhzad
752961b4ca
Rollup merge of #70641 - estebank:dedup-code, r=nikomatsakis
Remove duplicated code in trait selection
2020-04-03 22:55:08 +02:00
Mazdak Farrokhzad
a928f64464
Rollup merge of #70640 - jonas-schievink:async-ice, r=cramertj
Hide `task_context` when lowering body

Fixes https://github.com/rust-lang/rust/issues/70594
2020-04-03 22:55:07 +02:00
Mazdak Farrokhzad
1ea8653d01
Rollup merge of #70597 - vakaras:thread_new_double_free_bug_fix, r=Amanieu
Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new

While working on concurrency support for Miri, I found that the `libstd::syn::unix::Thread::new` method has two potential problems: double-free and undefined behaviour.

**Double-free** could occur if the following events happened (credit for pointing this out goes to @RalfJung):

1.  The call to `pthread_create` successfully launched a new thread that executed to completion and deallocated `p`.
2.  The call to `pthread_attr_destroy` returned a non-zero value causing the `assert_eq!` to panic.
3.  Since `mem::forget(p)` was not yet executed, the destructor of `p` would be executed and cause a double-free.

As far as I understand, this code also violates the stacked-borrows aliasing rules and thus would result in **undefined behaviour** if these rules were adopted.  The problem is that the ownership of `p` is passed to the newly created thread before the call to `mem::forget`. Since the call to `mem::forget` is still a call, it counts as a use of `p` and triggers UB.

This pull request changes the code to use `mem::ManuallyDrop` instead of `mem::forget`. As a consequence, in case of a panic, `p` would be potentially leaked, which while undesirable is probably better than double-free or undefined behaviour.
2020-04-03 22:55:05 +02:00
Mazdak Farrokhzad
17a59fb29c
Rollup merge of #70576 - Rustin-Liu:rustin-patch-link-cfg, r=varkor
Update the description of the ticket to point at RFC 1721

Fixes #70538.

My first PR to rust. So please let me know if I'm doing something wrong.
2020-04-03 22:55:03 +02:00
Mazdak Farrokhzad
9b22fdc121
Rollup merge of #69860 - faern:use-assoc-int-consts, r=dtolnay
Use associated numeric consts in documentation

Now when the associated constants on int/float types are stabilized and the recommended way of accessing said constants (#68952). We can start using it in this repository, and recommend it via documentation example code.

This PR is the reincarnation of #67913 minus the actual adding + stabilization of said constants. (EDIT: Now it's only changing the documentation. So users will see the new consts, but we don't yet update the internal code)

Because of how fast bit rot happens to PRs that touch this many files, it does not try to replace 100% of the old usage of the constants in the entire repo, but a good chunk of them.
2020-04-03 22:55:02 +02:00
Josh Stone
6fdd4f37b7 Use a macro to expand the specialized Fuse 2020-04-03 13:53:46 -07:00
Josh Stone
f8d6fc1d10 Open-code Fuse's Option matches 2020-04-03 13:53:46 -07:00
Oliver Scherer
f030635e66 Add regression test for #70673 2020-04-03 10:50:06 -07:00
Rustin-Liu
d2ad9f4453 Update the description of link_cfg unstable
Fmt code

Update tests

Modify msg

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-04 01:43:16 +08:00
Vytautas Astrauskas
d512b22f8b Delete unnecessary stub stack overflow handler for cloudabi. 2020-04-03 10:13:49 -07:00
Vytautas Astrauskas
d637d6e7a8 Delete unnecessary stub stack overflow handler for hermit. 2020-04-03 10:07:40 -07:00
Daniel Frampton
794181788d Make panic unwind the default for aarch64-*-windows-msvc targets 2020-04-03 09:41:58 -07:00
DutchGhost
0ca2a5e52c Add test for #59023 2020-04-03 18:31:04 +02:00
Mazdak Farrokhzad
5a7ad49620 def_collector, visit_fn: account for no body 2020-04-03 17:01:21 +02:00
bors
f6fe99c798 Auto merge of #70734 - Dylan-DPC:rollup-xmncatq, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #70696 (Extend #69020 test to include reversed operand order.)
 - #70706 (Minor cleanup in rustdoc --check-theme)
 - #70725 (Avoid `.unwrap()`s on `.span_to_snippet(...)`s)
 - #70728 (Minor doc improvements on `AllocRef`)
 - #70730 (Fix link in task::Wake docs)
 - #70731 (Minor follow-up after renaming librustc(_middle))

Failed merges:

r? @ghost
2020-04-03 13:42:08 +00:00
Mazdak Farrokhzad
abe0c2de43 cleanup lower_item_id 2020-04-03 15:39:35 +02:00
Guillaume Gomez
9db7360593 Clean up E0502 explanation 2020-04-03 13:41:34 +02:00
Dylan DPC
04824f302a
Rollup merge of #70731 - JohnTitor:follow-up-rustc-middle, r=eddyb
Minor follow-up after renaming librustc(_middle)

Fixes #70537
r? @Centril @eddyb
2020-04-03 13:31:30 +02:00
Dylan DPC
15be59ddb3
Rollup merge of #70730 - yoshuawuyts:fix-wake-docs-link, r=Dylan-DPC
Fix link in task::Wake docs

`task::Wake` was introduced in https://github.com/rust-lang/rust/pull/68700. While I was browsing the docs I noticed a link to `sync::Arc` wasn't resolving correctly. This patch fixes that. Thanks!

## Before

![Screenshot_2020-04-03 std task Wake - Rust](https://user-images.githubusercontent.com/2467194/78346384-466cb280-759f-11ea-97c8-aede186c674e.png)

## Proposed

![Screenshot_2020-04-03 alloc task Wake - Rust](https://user-images.githubusercontent.com/2467194/78349819-79657500-75a4-11ea-9282-16691ae2a5d4.png)
2020-04-03 13:31:28 +02:00
Dylan DPC
53d786f404
Rollup merge of #70728 - TimDiekmann:allocref-doc, r=Amanieu
Minor doc improvements on `AllocRef`

r? @Amanieu
2020-04-03 13:31:27 +02:00
Dylan DPC
b91c376e4a
Rollup merge of #70725 - Centril:nix-unwraps, r=estebank
Avoid `.unwrap()`s on `.span_to_snippet(...)`s

First commit fixes https://github.com/rust-lang/rust/issues/70724 and the others fix similar issues found by grepping.

r? @estebank
2020-04-03 13:31:25 +02:00
Dylan DPC
5082fe21a8
Rollup merge of #70706 - gizmondo:check-theme, r=GuillaumeGomez
Minor cleanup in rustdoc --check-theme

Expand and remove try_something macro. Since 2f6226518b there has been only one invocation.

r? @GuillaumeGomez
2020-04-03 13:31:24 +02:00
Dylan DPC
ea28134f2d
Rollup merge of #70696 - jumbatm:extend-issue-69020-test, r=RalfJung
Extend #69020 test to include reversed operand order.

Make sure we still emit if a lint if the generic argument comes first. See https://github.com/rust-lang/rust/pull/70566#issuecomment-607671340.

r? @RalfJung
2020-04-03 13:31:22 +02:00
bors
34f7f55e7a Auto merge of #70695 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/70664
r? @ghost Cc @oli-obk
2020-04-03 10:23:15 +00:00
Yuki Okushi
99e0d8ed79
Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
Yoshua Wuyts
3d17993f9f Fix link in task::Wake docs 2020-04-03 11:33:27 +02:00
Linus Färnstrand
c831265940 Replace float module consts with assoc consts in documentation 2020-04-03 09:33:10 +02:00
Linus Färnstrand
c0ec0a27b3 Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
Linus Färnstrand
e9ce03648d Make documentation examples use new integer assoc consts 2020-04-03 09:33:10 +02:00
bors
424c793925 Auto merge of #70582 - pnkfelix:update-llvm-to-fix-69841, r=cuviper
Fix #69841 by updating LLVM submodule.

Fix #69841 by updating LLVM submodule.

Includes regression test for issue 69841.
2020-04-03 07:26:00 +00:00
Ralf Jung
677ba040b7 update miri 2020-04-03 08:52:12 +02:00
Tim Diekmann
c061ff4b69
Update mod.rs 2020-04-03 08:22:31 +02:00
Tim Diekmann
d8b0c5fb37 Minor doc improvements on AllocRef 2020-04-03 07:28:23 +02:00
bors
548afdbe1a Auto merge of #70726 - Centril:rollup-zrdkkpt, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #68334 (AArch64 bare-metal targets: Build rust-std)
 - #70224 (Clean up rustdoc js testers)
 - #70532 (Miri engine: stronger type-based sanity check for assignments)
 - #70698 (bootstrap: add `--json-output` for rust-analyzer)
 - #70715 (Fix typo in operands section)

Failed merges:

r? @ghost
2020-04-03 04:18:32 +00:00
Mazdak Farrokhzad
c2372f109e
Rollup merge of #70715 - awh6al:patch-1, r=Dylan-DPC
Fix typo in operands section
2020-04-03 03:26:52 +02:00
Mazdak Farrokhzad
17f204feee
Rollup merge of #70698 - nikomatsakis:x-py-json-output, r=Mark-Simulacrum
bootstrap: add `--json-output` for rust-analyzer

Motivation is that this allows us to customize rust-analyzer's "cargo watch" integration to run x.py. You simply have to set the command to run to be `x.py --json-output`

r? @Mark-Simulacrum -- feel free to make changes, this is quick and dirty for sure
2020-04-03 03:26:50 +02:00
Mazdak Farrokhzad
4f0a791d5d
Rollup merge of #70532 - RalfJung:miri-assign, r=eddyb
Miri engine: stronger type-based sanity check for assignments

r? @oli-obk @eddyb
Fixes https://github.com/rust-lang/rust/issues/70405

That issue says
> be sure to also add appropriate mutability checks to the patterns (mutable for the source, immutable for the dest)

I decided not to do that because I see no good reason to do it. The engine does not care either way, the assignment will happen correctly.
2020-04-03 03:26:49 +02:00