Commit Graph

105945 Commits

Author SHA1 Message Date
Tyler Mandry
13a91a82ff Update LLVM
Fixes #67855 (rust-lang/llvm-project#31)
Fixes #66036 (rust-lang/llvm-project#32)
2020-01-21 15:11:54 -08:00
Mark Rousskov
dc97181a09 Do not base path to append extension
We already have ownership of the base path, so no need to clone it (within
Path::with_extension).
2020-01-22 08:10:41 +09:00
Mark Rousskov
8c6067c24e Store filestem in a pre-formatted form 2020-01-22 08:10:40 +09:00
Mark Rousskov
d1bb7e16e0 Privatize private fields of OutputFilenames 2020-01-22 08:10:05 +09:00
Philipp Gesang
db3b40c2a1
Cleanup: rewrite conditional as match
As suggested by @Centril.

Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
2020-01-21 21:48:07 +01:00
Esteban Küber
c775927d7f Suggest borrowing Vec<NonCopy> in for loop
Partially address #64167.
2020-01-21 11:11:00 -08:00
bors
5e8897b7b5 Auto merge of #68423 - Centril:rollup-bdjykrv, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #67686 (Simplify NodeHeader by avoiding slices in BTreeMaps with shared roots)
 - #68140 (Implement `?const` opt-out for trait bounds)
 - #68313 (Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD)
 - #68328 (Actually pass target LLVM args to LLVM)
 - #68399 (check_match: misc unifications and ICE fixes)
 - #68415 (tidy: fix most clippy warnings)
 - #68416 (lowering: cleanup some hofs)

Failed merges:

r? @ghost
2020-01-21 18:55:26 +00:00
Mazdak Farrokhzad
c1b20b1ae3
Rollup merge of #68416 - Centril:lowering-cleanup-hofs, r=pietroalbini
lowering: cleanup some hofs

Some drive-by cleanup while working on `let_chains`.

r? @pietroalbini
2020-01-21 19:42:28 +01:00
Mazdak Farrokhzad
b6d6391218
Rollup merge of #68415 - matthiaskrgr:tidy_clippy, r=oli-obk
tidy: fix most clippy warnings
2020-01-21 19:42:26 +01:00
Mazdak Farrokhzad
58504823f5
Rollup merge of #68399 - Centril:check-match-unify, r=oli-obk
check_match: misc unifications and ICE fixes

These are some unifications made as a by-product of working on `hir::ExprKind::Let`.

Fixes https://github.com/rust-lang/rust/issues/68396.
Fixes https://github.com/rust-lang/rust/issues/68394.
Fixes https://github.com/rust-lang/rust/issues/68393.

r? @oli-obk @matthewjasper
2020-01-21 19:42:25 +01:00
Mazdak Farrokhzad
3fa8cc3877
Rollup merge of #68328 - jethrogb:jb/target-llvm-args, r=alexcrichton
Actually pass target LLVM args to LLVM

Missed in #68059

r? @alexcrichton
2020-01-21 19:42:23 +01:00
Mazdak Farrokhzad
dabd81666a
Rollup merge of #68313 - batrla:master, r=alexcrichton
Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD

Options IP_MULTICAST_TTL and IP_MULTICAST_LOOP are 1 byte on BSD and Solaris

See ip(4P) man page:
 IP_MULTICAST_TTL     Time  to live for multicast datagrams. This option
                      takes an unsigned character as  an  argument.  Its
                      value  is  the TTL that IP uses on outgoing multi-
                      cast datagrams. The default is 1.

 IP_MULTICAST_LOOP    Loopback for multicast datagrams. Normally  multi-
                      cast  datagrams  are  delivered  to members on the
                      sending  host  (or  sending  zone).  Setting   the
                      unsigned  character argument to 0 causes the oppo-
                      site behavior, meaning that  when  multiple  zones
                      are  present,  the  datagrams are delivered to all
                      zones except the sending zone.

https://docs.oracle.com/cd/E88353_01/html/E37851/ip-4p.html
https://man.openbsd.org/ip.4
2020-01-21 19:42:22 +01:00
Mazdak Farrokhzad
3484e2fab4
Rollup merge of #68140 - ecstatic-morse:const-trait-bound-opt-out, r=oli-obk
Implement `?const` opt-out for trait bounds

For now, such bounds are treated exactly the same as unprefixed ones in all contexts. [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) does not specify whether such bounds are forbidden outside of `const` contexts, so they are allowed at the moment.

Prior to this PR, the constness of a trait bound/impl was stored in `TraitRef`. Now, the constness of an `impl` is stored in `ast::ItemKind::Impl` and the constness of a bound in `ast::TraitBoundModifer`. Additionally, constness of trait bounds is now stored in an additional field of `ty::Predicate::Trait`, and the combination of the constness of the item along with any `TraitBoundModifier` determines the constness of the bound in accordance with the RFC. Encoding the constness of impls at the `ty` level is left for a later PR.

After a discussion in \#wg-grammar on Discord, it was decided that the grammar should not encode the mutual exclusivity of trait bound modifiers. The grammar for trait bound modifiers remains `[?const] [?]`. To encode this, I add a dummy variant to `ast::TraitBoundModifier` that is used when the syntax `?const ?` appears. This variant causes an error in AST validation and disappears during HIR lowering.

cc #67794

r? @oli-obk
2020-01-21 19:42:20 +01:00
Mazdak Farrokhzad
d532a04a1c
Rollup merge of #67686 - ssomers:keys_start_slasher, r=Mark-Simulacrum
Simplify NodeHeader by avoiding slices in BTreeMaps with shared roots

Simplify a complicated piece of code that creates slices of keys in node leaves.
2020-01-21 19:42:17 +01:00
XAMPPRocky
5918e9f025
Update RELEASES.md 2020-01-21 19:12:39 +01:00
Jonas Schievink
d022e01caa Do not use Cortex-M0 since Qemu is too old 2020-01-21 19:01:56 +01:00
Jonas Schievink
6175f447b5 Check in lockfile 2020-01-21 19:01:56 +01:00
Jonas Schievink
36e230fe22 Update dependencies
This fixes a linkage issue that was fixed a while ago, and adds thumbv8
support.
2020-01-21 19:01:56 +01:00
Jonas Schievink
ce36c98e5b Use the right runners for all thumb targets 2020-01-21 19:01:56 +01:00
Jonas Schievink
ef5f929471 Account for run-make tests in is_up_to_date 2020-01-21 19:01:56 +01:00
Jonas Schievink
ce7172da51 Fix thumb target CI 2020-01-21 19:01:56 +01:00
Philipp Gesang
02e66baac6
Test try diagnostics for impl and trait methods
Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
2020-01-21 18:56:56 +01:00
Eric Huss
d45d8b1c7b Update cargo, books 2020-01-21 09:55:43 -08:00
Philipp Gesang
5dee7dddf2
Handle methods in try diagnostic
The diagnostic for diagnostic for methods and trait provided
methods would only show the empty string:

    error[E0277]: the `?` operator can only be used in  that returns `Result` or `Option` (or another type that implements `std::ops::Try`)

Handle the missing cases so it reads ``a method'' / ``an async
method'' / ``a trait method'' respectively.

Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
2020-01-21 18:49:18 +01:00
Mazdak Farrokhzad
7dceff9b5b typeck: remove redundant diverges check 2020-01-21 18:47:58 +01:00
Mazdak Farrokhzad
1240a3180d typeck: remove redundant diverges code 2020-01-21 18:24:25 +01:00
Mazdak Farrokhzad
d47673d3d7 typeck: use diverges.replace(..) 2020-01-21 17:37:11 +01:00
Jorge Aparicio
8abbd0beae for now, do not build rust-std for the armv7a-none-eabihf target
it needs some upstream changes in the build script of the compiler-builtins
crate
2020-01-21 17:18:37 +01:00
Mazdak Farrokhzad
32a81f7742 lowering: cleanup some hofs 2020-01-21 17:04:43 +01:00
bors
2cf24ab891 Auto merge of #65672 - ecstatic-morse:unified-dataflow-proto, r=pnkfelix
A single framework for gen-kill and generic dataflow problems

This is the prototype implementation discussed in rust-lang/compiler-team#202. You can read a high-level description of it in [the proposal](https://hackmd.io/@39Qr_z9cQhasi25sGjmFnA/Skvd9rztS) for that design meeting. This would eventually supersede the existing `BitDenotation` interface.

r? @ghost

cc @rust-lang/compiler (esp. @eddyb and @pnkfelix)
2020-01-21 15:29:18 +00:00
Stein Somers
3e947ef031 Declare unsafe functions that can no longer handle shared roots 2020-01-21 16:12:19 +01:00
Matthias Krüger
14c002edb6 tidy: fix most clippy warnings 2020-01-21 15:33:17 +01:00
Erin Power
c75a1f0e4d
Update RELEASES.md for 1.41.0 2020-01-21 11:47:06 +01:00
Dylan MacKenzie
6bd69a1092 Add comment explaining MaybeConstMaybe lowering 2020-01-21 01:45:31 -08:00
Guillaume Gomez
6590339c31 Clean up E0205 explanation 2020-01-21 10:40:36 +01:00
Stein Somers
1b800a5671 trade in outdated comments for correct ones 2020-01-21 10:30:14 +01:00
bors
ce361fb24f Auto merge of #68267 - estebank:lt-sugg, r=petrochenkov
Tweak lifetime definition errors

Taking inspiration from the narrative in @fasterthanlime's https://fasterthanli.me/blog/2019/declarative-memory-management/, add suggestions to some lifetime definition errors.
2020-01-21 06:28:33 +00:00
bors
8c73fa70f3 Auto merge of #68154 - ssomers:btreemap_navigation_benches, r=Mark-Simulacrum
Add more BTreeMap/BTreeSet benchmarks regarding iteration

Serving #67073 or other developments
2020-01-21 03:07:01 +00:00
varkor
dd0507c054 Make TooGeneric error in WF checking a proper error
`TooGeneric` is encountered during WF checking when we cannot determine that a constant involving a generic parameter will always be evaluated successfully (rather than resulting in an error). In these cases, the burden of proof should be with the caller, so that we can avoid post-monomorphisation tim errors (which was the previous previous behaviour). This commit ensures that this situation produces a proper compiler error, rather than silently ignoring it or ICEing.
2020-01-21 01:03:15 +00:00
Tomasz Miąsko
d8c661a886 Mark __msan_keep_going as an exported symbol for LTO 2020-01-21 00:00:00 +00:00
bors
06b945049b Auto merge of #68405 - JohnTitor:rollup-kj0x4za, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #67734 (Remove appendix from Apache license)
 - #67795 (Cleanup formatting code)
 - #68290 (Fix some tests failing in `--pass check` mode)
 - #68297 ( Filter and test predicates using `normalize_and_test_predicates` for const-prop)
 - #68302 (Fix #[track_caller] and function pointers)
 - #68339 (Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest)
 - #68381 (Added minor clarification to specification of GlobalAlloc::realloc.)
 - #68397 (rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s)

Failed merges:

r? @ghost
2020-01-20 23:35:50 +00:00
Mazdak Farrokhzad
58eb03d20f check_match: simplify check_arm 2020-01-20 23:39:24 +01:00
Yuki Okushi
f6406f7f68
Rollup merge of #68397 - ollie27:rustdoc_async_unsafe, r=Centril
rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`s

The order was swapped in #61319 but rustdoc was never updated to match.

r? @GuillaumeGomez
2020-01-21 07:32:50 +09:00
Yuki Okushi
32ecb6f1f2
Rollup merge of #68381 - mjp41:master, r=Dylan-DPC
Added minor clarification to specification of GlobalAlloc::realloc.

The specification of `realloc` is slightly unclear:

```
    /// * `layout` must be the same layout that was used
    ///   to allocate that block of memory,
```
https://github.com/rust-lang/rust/blob/master/src/libcore/alloc.rs#L541-L542

In the case of an `alloc` or `alloc_zeroed` this is fairly evidently the `layout` parameter passed into the original call.  In the case of a `realloc`, this I assume is `layout` modified to contain `new_size`.  However, I could not find this case specified in the documentation.  Thus technically in a sequence of calls to `realloc`, it would be valid to provide the second call to `realloc` the same `layout` as the first call to `realloc`, which is almost certainly not going to be handled correctly.

This PR attempts to clarify the specification.
2020-01-21 07:32:48 +09:00
Yuki Okushi
67b87c8ba8
Rollup merge of #68339 - msizanoen1:patch-1, r=pietroalbini
Add `riscv64gc-unknown-linux-gnu` into target list in build-manifest

Missed in #68037

r? @alexcrichton
2020-01-21 07:32:47 +09:00
Yuki Okushi
8d2bac8dff
Rollup merge of #68302 - anp:caller-fn-ptr, r=eddyb,oli-obk
Fix #[track_caller] and function pointers

Starting with failing tests, fix the miscompilation and ICE caused by `ReifyShim` bug.

Fixes #68178.
2020-01-21 07:32:45 +09:00
Yuki Okushi
bff216c56f
Rollup merge of #68297 - Aaron1011:fix/new-const-prop-bounds, r=oli-obk
Filter and test predicates using `normalize_and_test_predicates` for const-prop

Fixes #68264

Previously, I attempted to use
`substitute_normalize_and_test_predicates` to detect unsatisfiable
bounds. Unfortunately, since const-prop runs in a generic environment
(we don't have any of the function's generic parameters substituted),
this could lead to cycle errors when attempting to normalize predicates.

This check is replaced with a more precise check. We now only call
`normalize_and_test_predicates` on predicates that have the possibility
of being proved unsatisfiable - that is, predicates that don't depend
on anything local to the function (e.g. generic parameters). This
ensures that we don't hit cycle errors when we normalize said
predicates, while still ensuring that we detect unsatisfiable
predicates.

I haven't been able to come up with a minimization of the Diesel issue - however, I've verified that it compiles successfully.
2020-01-21 07:32:44 +09:00
Yuki Okushi
eff6381c32
Rollup merge of #68290 - petrochenkov:passcheck, r=oli-obk
Fix some tests failing in `--pass check` mode

Warnings reported at codegen or linking time either have to be converted to errors (preferable), or the tests for them need to be marked with `// ignore-pass` (as a last resort).

ecd5852194 turned them from errors to warnings, but that shouldn't be necessary because it's still clear from the `.stderr` output that the errors are lints and not hard-coded.
2020-01-21 07:32:42 +09:00
Yuki Okushi
e1bd9b3396
Rollup merge of #67795 - Mark-Simulacrum:fmt-argument, r=dtolnay
Cleanup formatting code

This removes a few leftover positional enum variants that were no longer used.

All details that are changed are unstable (and `#[doc(hidden)]`), so this should
not impact downstream code.
2020-01-21 07:32:40 +09:00
Yuki Okushi
ec7f209ad4
Rollup merge of #67734 - XAMPPRocky:master, r=skade
Remove appendix from Apache license

Looking at the codebase I noticed an oddity, in that the appendix of how use the Apache licence is still contained in the licence file. We don't put licence headers at the top of all of our files so I don't think we need to keep this. Alternatively we could delete everything above line 191 to have a shorter licence file.
2020-01-21 07:32:39 +09:00