Commit Graph

107775 Commits

Author SHA1 Message Date
Dylan DPC
7603c2cfba
Rollup merge of #69423 - petrochenkov:nont, r=Centril
syntax: Remove `Nt(Impl,Trait,Foreign)Item`

Follow-up to https://github.com/rust-lang/rust/pull/69366.
r? @Centril
2020-02-26 02:07:14 +01:00
Dylan DPC
d050b00759
Rollup merge of #69412 - tmiasko:checked-unused, r=petrochenkov
Mark attributes consumed by `check_mod_attrs` as normal

Take advantage of the fact that `check_mod_attrs` marks attributes as
used and change their type to normal, so that any remaining uses will be
warned about by the unused attribute lint.
2020-02-26 02:07:12 +01:00
Dylan DPC
41bf200073
Rollup merge of #69387 - petrochenkov:idprint, r=Mark-Simulacrum
Deduplicate identifier printing a bit

https://github.com/rust-lang/rust/pull/67010 introduced a couple more subtly different ways to print an identifier.
This PR attempts to restore the order.

The most basic identifier printing interface is `Formatter`-based now, so `String`s are not allocated unless required.

r? @Mark-Simulacrum
2020-02-26 02:07:11 +01:00
Dylan DPC
0860f5aebd
Rollup merge of #67637 - Mark-Simulacrum:primitive-mod, r=dtolnay
Add primitive module to libcore

This re-exports the primitive types from libcore at `core::primitive` to allow
macro authors to have a reliable location to use them from.

Fixes #44865
2020-02-26 02:07:05 +01:00
bors
55a777cd92 Auto merge of #69450 - cuviper:llvm-scev-no-wrap, r=nikic
Cherry-pick the LLVM fix for #69225

An additional reproducer was provided in #69225 -- the new testcase here -- which still crashes even after #69241 reverted #67174. Now this pull request updates LLVM with the cherry-picked reversion of its own. This is also going to stable in #69444.

I have not tried to reapply #67174 yet -- cc @kraai @shahn
2020-02-25 22:13:27 +00:00
Pietro Albini
9d84f1f684
backport release notes of 1.41.1 2020-02-25 20:19:46 +01:00
bors
6fd8798f4d Auto merge of #69421 - flip1995:clippyup, r=Dylan-DPC
Update Clippy from 8fbb23f to fc5d0cc

Fixes #69419

```
Fix false positive in `missing_const_for_fn`
Rustup to rust-lang/rust#69366
Add new lint [`wildcard imports`]. Add suggestion to [`enum_glob_use`]
Add new lint `lossy_float_literal` to detect lossy whole number float literals
```
2020-02-25 15:08:50 +00:00
Guillaume Gomez
d6f83c541d Clean up E0371 explanation 2020-02-25 13:28:47 +01:00
Guillaume Gomez
f56042fb3c Clean up E0370 explanation 2020-02-25 13:28:40 +01:00
bors
e3a277943e Auto merge of #69440 - Dylan-DPC:rollup-hj4bo9l, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #69220 (Add documentation for the `-Zself-profile` flag)
 - #69391 (Add rustdoc aliases to `ptr::copy` and `ptr::copy_nonoverlapping`)
 - #69427 (Cleanup e0368 e0369)
 - #69433 (don't explicitly compare against true or false)
 - #69435 (Replace uses of Cell::get + Cell::set with Cell::replace.)
 - #69437 (no more codegen for miri_start_panic)

Failed merges:

r? @ghost
2020-02-25 11:56:56 +00:00
bors
e9b961754e Auto merge of #69428 - matthiaskrgr:submodule_upd, r=Xanewok
submodules: update rls from 10bf331 to 5fde462

Changes:
````
Update cargo.
````

Fixes #69383
Fixes #69286

r? @Xanewok
2020-02-25 08:36:38 +00:00
Mazdak Farrokhzad
7876711b9b parse: address nitpick 2020-02-25 06:00:47 +01:00
Mazdak Farrokhzad
d234e131b8 check_pat_ref: use pattern_cause 2020-02-25 05:53:21 +01:00
Mazdak Farrokhzad
b1de8f16ca check_pat_tuple: use pattern_cause 2020-02-25 05:46:58 +01:00
Mazdak Farrokhzad
e9f6bb7f79 check_pat_path: use pattern_cause 2020-02-25 05:41:03 +01:00
Mazdak Farrokhzad
1d33717583 improve or-pattern type consistency diagnostics 2020-02-25 05:30:43 +01:00
Mazdak Farrokhzad
e58496c371 improve ParentHirIterator discoverability 2020-02-25 05:30:11 +01:00
Mazdak Farrokhzad
5da3a2f354 enhance check_pat_lit with TopInfo 2020-02-25 04:10:58 +01:00
John Ericson
4f15867faf bootstrap: Further centralize target defaulting logic.
Background: targets can be specied with or without config files;
unneccessarily differences in the logic between those cases has caused
a) the bug I tried to fix in the previous commit, b) the bug I
introduced in the previous commit.

The solution is to make the code paths the same as much as possible.

1. Targets are now not created from the `default` method. (I would both
remove the impl if this was a public library, but just wrap it for
convience becaues it's not.) Instead, there is a `from_triple` method
which does the defaulting.

2. Besides the sanity checking, use the new method in the code reading
config files. Now `no_std` is overriden iff set explicitly just like the
other fields which are optional in the TOML AST type.

3. In sanity checking, just populate the map for all targets no matter
what. That way do don't duplicate logic trying to be clever and remember
which targets have "non standard" overrides. Sanity checking is back to
just sanity checking, and out of the game of trying to default too.
2020-02-24 21:59:36 -05:00
Mazdak Farrokhzad
9b6e0e8b94 simplify check_pat_lit 2020-02-25 03:43:34 +01:00
Josh Stone
6e846992d0 Cherry-pick the LLVM fix for #69225 2020-02-24 16:21:22 -08:00
Yuki Okushi
8d0e9187ad Do not ping PR reviewers in toolstate breakage 2020-02-25 09:07:03 +09:00
Mazdak Farrokhzad
1eb0844f5d parse: move condition into guard 2020-02-25 00:59:39 +01:00
Mazdak Farrokhzad
32295aee6e parse: simplify parse_stmt_without_recovery. 2020-02-24 21:53:23 +01:00
Mazdak Farrokhzad
245e15b4ac parse: extract parse_stmt_item & parse_stmt_path_start. 2020-02-24 21:53:23 +01:00
Dylan DPC
e238eb610f
Rollup merge of #69437 - RalfJung:miri-no-codegen, r=ecstatic-morse
no more codegen for miri_start_panic

With https://github.com/rust-lang/miri/pull/1136 landed, we don't generate code any more for crates that will be run by Miri. So the LLVM backend does not have to implement the `miri_start_panic` intrinsic any more.

Cc @Aaron1011
2020-02-24 20:10:19 +01:00
Dylan DPC
726a025c65
Rollup merge of #69435 - anyska:cell-replace, r=Centril
Replace uses of Cell::get + Cell::set with Cell::replace.
2020-02-24 20:10:18 +01:00
Dylan DPC
eda4489121
Rollup merge of #69433 - matthiaskrgr:bool_cmp, r=eddyb
don't explicitly compare against true or false
2020-02-24 20:10:16 +01:00
Dylan DPC
cfed378da2
Rollup merge of #69427 - GuillaumeGomez:cleanup-e0368-e0369, r=Dylan-DPC
Cleanup e0368 e0369

r? @Dylan-DPC
2020-02-24 20:10:15 +01:00
Dylan DPC
3e7a18e5e5
Rollup merge of #69391 - memoryruins:memalias, r=Mark-Simulacrum
Add rustdoc aliases to `ptr::copy` and `ptr::copy_nonoverlapping`

This PR adds a [rustdoc alias](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#add-aliases-for-an-item-in-documentation-search) to `ptr::copy` and `ptr::copy_nonoverlapping` using the commonly used terms `memcpy` and `memmove`. The motivation for this PR is to improve discoverability for these functions, since I've noticed users overlook these functions on multiple occasions (and they have thus reached for [libc](https://crates.io/crates/libc) without need). Currently std docs state:

https://doc.rust-lang.org/nightly/std/ptr/fn.copy_nonoverlapping.html
> `copy_nonoverlapping` is semantically equivalent to C's `memcpy`, but with the argument order swapped.

https://doc.rust-lang.org/nightly/std/ptr/fn.copy.html
> `copy` is semantically equivalent to C's `memmove`, but with the argument order swapped.

#### search results before adding a rustdoc alias:
![screenshot 6517](https://user-images.githubusercontent.com/6868531/75102985-78fbb680-55c2-11ea-8e41-04979e6fa6f6.png)
![screenshot 6518](https://user-images.githubusercontent.com/6868531/75102984-78632000-55c2-11ea-9673-8822aae636d1.png)

#### after adding `#[doc(alias = "memcpy")]` and `#[doc(alias = "memmove")]`:
![screenshot 6516](https://user-images.githubusercontent.com/6868531/75102986-78fbb680-55c2-11ea-93b9-1929be940043.png)
![screenshot 6515](https://user-images.githubusercontent.com/6868531/75102987-78fbb680-55c2-11ea-9861-ce8a77a0c3b9.png)
2020-02-24 20:10:13 +01:00
Dylan DPC
d91657877a
Rollup merge of #69220 - wesleywiser:doc_self_profile_unstable_book, r=nikomatsakis
Add documentation for the `-Zself-profile` flag
2020-02-24 20:10:12 +01:00
Vadim Petrochenkov
f7d55be7e5 resolve: lifetimes.rs -> late/lifetime.rs 2020-02-24 21:46:21 +03:00
Vadim Petrochenkov
d134385823 syntax: Remove Nt(Impl,Trait,Foreign)Item 2020-02-24 20:25:32 +03:00
Ana-Maria
0445574340 Replace uses of Cell::get + Cell::set with Cell::replace. 2020-02-24 16:23:55 +00:00
Vadim Petrochenkov
4dbdadf94d rustc_metadata: Use binary search from standard library
instead of a hand rolled one.
2020-02-24 19:17:07 +03:00
Matthias Krüger
addd7426be don't explicitly compare against true or false 2020-02-24 16:52:40 +01:00
Ana-Maria
162d72727e Also blacklist powerpc-unknown-linux-musl. 2020-02-24 15:51:08 +00:00
Ralf Jung
4e867535f3 no more codegen for miri_start_panic 2020-02-24 16:42:26 +01:00
Vadim Petrochenkov
487c378fc6 rustc_metadata: Load metadata for indirect macro-only dependencies 2020-02-24 18:03:00 +03:00
bors
834bc5650a Auto merge of #69344 - RalfJung:miri, r=oli-obk
bump Miri

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

r? @ghost Cc @oli-obk
2020-02-24 14:54:39 +00:00
Matthias Krüger
1892ff7aa6 librustc_macros: remove redundant single component path import 2020-02-24 14:56:30 +01:00
Matthias Krüger
d4a005bd03 librustc{, codegen_ssa,infer,mir_build}: don't clone types that are copy 2020-02-24 14:56:29 +01:00
Matthias Krüger
5ae4500eff remove redundant clones in librustc_mir_build and librustc_data_structures 2020-02-24 14:56:29 +01:00
Matthias Krüger
3fb76946cd submodules: update rls from 10bf331 to 5fde462
Changes:
````
Update cargo.
````

Fixes #69383
Fixes #69286

r? @Xanewok
2020-02-24 13:47:34 +01:00
Ralf Jung
ffa1aa6434 bump Miri once more 2020-02-24 13:08:24 +01:00
Guillaume Gomez
ca5bbd190a Clean up E0368 and E0369 explanations 2020-02-24 12:57:19 +01:00
bors
d9a328a0ad Auto merge of #69424 - pietroalbini:rollup-3oelogm, r=pietroalbini
Rollup of 5 pull requests

Successful merges:

 - #69372 (Updates links in various Compiler Error Index entries)
 - #69385 (Relax str::get_unchecked precondition to permit empty slicing)
 - #69386 (Fix minor error in `MaybeUninit::get_mut()` doc example)
 - #69394 (Clean up E0367 explanation)
 - #69405 (docs: Stdin::read_line: mention the appending)

Failed merges:

r? @ghost
2020-02-24 11:41:30 +00:00
Andreas Molzer
329022dfad Address method comments 2020-02-24 11:23:47 +01:00
Pietro Albini
ba3fee6537
Rollup merge of #69405 - NieDzejkob:docs-readline-appends, r=joshtriplett
docs: Stdin::read_line: mention the appending

The fact that `stdin().read_line()` is an [unpleasant](https://twitter.com/Michcioperz/status/1231646797661167617?s=20) [footgun](https://rustbattle.net/battle/straight-finch-8-e4f4). Let's make it clearer in the documentation.
2020-02-24 11:15:36 +01:00
Pietro Albini
1cfb6c2ab0
Rollup merge of #69394 - GuillaumeGomez:clean-up-0367, r=Dylan-DPC
Clean up E0367 explanation

r? @Dylan-DPC
2020-02-24 11:15:34 +01:00