Commit Graph

119629 Commits

Author SHA1 Message Date
Camille GILLOT
1b2deaf57a Monomorphise force_query_with_job. 2020-05-01 14:28:57 +02:00
bors
a91d64873f Auto merge of #71742 - matthiaskrgr:submodule_upd, r=Dylan-DPC
submodules: update cargo from 90931d9b3 to 258c89644

Changes:
````
Remove unnecessary loop in `maybe_spurious`
Fix error with git repo discovery and symlinks.
Allow failure when setting file mtime.
Support multiple `--target` flags on the CLI
build-std: Don't treat std like a "local" package.
Allow `cargo package --list` even for things that don't package.
````

I'd like to get https://github.com/rust-lang/cargo/pull/8186 into nightly asap. :)

r? @ehuss
2020-05-01 12:18:41 +00:00
LeSeulArtichaut
2474f0ed88 Allow #[target_feature] on safe functions 2020-05-01 14:17:43 +02:00
jumbatm
bd18ad4fef Note that try_validation_pat can take a format str directly. 2020-05-01 21:52:43 +10:00
jumbatm
830473959a Manually format macro to not go over text width. 2020-05-01 21:52:43 +10:00
jumbatm
8175c4ceec Expect at least one expr for p, what_fmt and expected_fmt. 2020-05-01 21:52:43 +10:00
jumbatm
f1d778fef1 Also make expected param wrapped in format_args. 2020-05-01 21:52:43 +10:00
jumbatm
65c36f6e38 Wrap try_validation_pat! args in format_args! 2020-05-01 21:52:43 +10:00
jumbatm
425a99f1eb Update try_validation_pat! doc comment. 2020-05-01 21:52:43 +10:00
jumbatm
cb96d41fa1 Apply suggestions for try_validation_pat!. 2020-05-01 21:52:43 +10:00
jumbatm
9459b37780 Fix comment to reflect error handling behaviour. 2020-05-01 21:52:43 +10:00
jumbatm
9c898d65b8 Allow unreachable_patterns instead of using if true 2020-05-01 21:52:43 +10:00
jumbatm
eca147896f Match kind in try_validation_pat!.
Avoids having to repeat InterpErrorInfo { .. }
2020-05-01 21:52:43 +10:00
jumbatm
656ab76397 Add FIXME about replacing all usages of try_validation. 2020-05-01 21:52:43 +10:00
jumbatm
894a83d409 Apply suggestions from code review
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-05-01 21:52:43 +10:00
jumbatm
5b1d6000a0 Update stderrs. 2020-05-01 21:52:43 +10:00
jumbatm
2887d7923e Partially unrevert #70566.
This partially reverts commit 4b5b6cbe60,
reversing some changes made to 62b362472d.
2020-05-01 21:52:43 +10:00
jumbatm
6b413d95fc Throw validation failure for InvalidUndefBytes. 2020-05-01 21:52:43 +10:00
jumbatm
bc7b7140b9 Don't fail for UndefinedBehaviourInfo in validation. 2020-05-01 21:52:43 +10:00
jumbatm
e66e37cbf1 Don't duplicate body of try_validation. 2020-05-01 21:52:43 +10:00
jumbatm
326d38fa09 Add try_validation_pat. 2020-05-01 21:52:43 +10:00
jumbatm
14d90deab9 Don't duplicate macro for optional arg. 2020-05-01 21:52:43 +10:00
Tshepang Lekhonkhobe
6a681f5ca1 remove obsolete comments
Referenced was removed in 8770d0f34a
2020-05-01 13:43:04 +02:00
Matthias Krüger
868d559699 submodules: update cargo from 90931d9b3 to 258c89644
Changes:
````
Remove unnecessary loop in `maybe_spurious`
Fix error with git repo discovery and symlinks.
Allow failure when setting file mtime.
Support multiple `--target` flags on the CLI
build-std: Don't treat std like a "local" package.
Allow `cargo package --list` even for things that don't package.
````
2020-05-01 13:04:03 +02:00
Ralf Jung
62ee0ea0b6 fmt 2020-05-01 12:08:16 +02:00
Tshepang Lekhonkhobe
8abfb685b3 remove obsolete comment
Referenced was removed in 9f492fefef
2020-05-01 11:45:05 +02:00
Ralf Jung
d0a746ecfa remove AllocId generalization of Pointer 2020-05-01 11:33:21 +02:00
Ralf Jung
6c8ae7c7e5 bootstrap: also apply unused-attributes hack without deny_warnings 2020-05-01 11:16:05 +02:00
bors
fd61d06772 Auto merge of #71704 - RalfJung:miri-error-print, r=oli-obk
Miri: tweak error print

I started by adjusting the "invalid use of int as pointer" message (it wasn't really clear what is invalid about the use). But then I realized that these are all `Debug` impls we use for these errors, for some reason, so I fixed that to use `Display` instead.

~~This includes https://github.com/rust-lang/rust/pull/71590 (to get the `Display` impl for `Pointer`), so the diff will look better once that finally lands. Here's the [relative diff](e72ebf5119...RalfJung:miri-error-print).~~

r? @oli-obk
2020-05-01 09:15:12 +00:00
Ralf Jung
cce0cb3c39 use hex for invalid bool and char (consistently with validation) 2020-05-01 10:56:17 +02:00
Ralf Jung
707bd7b213 rename InvalidIntPtrUsage 2020-05-01 10:50:04 +02:00
Ralf Jung
2feeb88b62 bless you 2020-05-01 10:50:04 +02:00
Ralf Jung
f94899565b InterpError printing really is more Display than Debug
also tweak InvalidDiscriminant message
2020-05-01 10:50:04 +02:00
Ralf Jung
671bc08ea8 tweak InvalidIntPointerUsage message 2020-05-01 10:50:04 +02:00
bors
bd0bacc694 Auto merge of #71623 - petrochenkov:localink, r=estebank
Disable localization for all linkers

We previously disabled non-English output from `link.exe` due to encoding issues (#35785).

In https://github.com/rust-lang/rust/pull/70740 it was pointed out that it also prevents correct inspection of the linker output, which we have to do occasionally.

So this PR disables localization for all linkers.
2020-05-01 04:43:28 +00:00
bors
e94eaa6dce Auto merge of #70674 - cjgillot:query-arena-all, r=matthewjasper
Have the per-query caches store the results on arenas

This PR leverages the cache for each query to serve as storage area for the query results.

It introduces a new cache `ArenaCache`, which moves the result to an arena,
and only stores the reference in the hash map.
This allows to remove a sizeable part of the usage of the global `TyCtxt` arena.

I only migrated queries that already used arenas before.
2020-05-01 01:38:05 +00:00
Matthias Krüger
b7800e1ac3 mismatched_target_os: link to respective section in rust reference 2020-05-01 01:21:24 +02:00
bors
614f273e93 Auto merge of #71721 - tmandry:rollup-e27pxex, r=tmandry
Rollup of 8 pull requests

Successful merges:

 - #71148 (Vec drop and truncate: drop using raw slice *mut [T])
 - #71465 (Add a convenience method on `TyCtxt` for checking for thread locals)
 - #71567 (Handle build completion message from Cargo)
 - #71590 (MIR dump: print pointers consistently with Miri output)
 - #71682 (Bump pulldown-cmark)
 - #71688 (Allow `Downcast` projections unconditionally in const-checking)
 - #71691 (Allow `Unreachable` terminators unconditionally in const-checking)
 - #71719 (Update backtrace-sys)

Failed merges:

r? @ghost
2020-04-30 22:24:24 +00:00
Tyler Mandry
59abc2afd8
Rollup merge of #71719 - tmandry:update-backtrace-sys, r=Mark-Simulacrum
Update backtrace-sys

Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)

This fixes an issue of libbacktrace never being built with debuginfo.

r? @Mark-Simulacrum
cc @alexcrichton
2020-04-30 15:23:20 -07:00
Tyler Mandry
1b62bb67da
Rollup merge of #71691 - ecstatic-morse:const-unreachable, r=oli-obk,RalfJung
Allow `Unreachable` terminators unconditionally in const-checking

If we ever actually reach an `Unreachable` terminator while executing, the MIR is ill-formed or the user's program is UB due to something like `unreachable_unchecked`. I don't think we need to forbid these in `qualify_min_const_fn`.

r? @oli-obk
2020-04-30 15:23:19 -07:00
Tyler Mandry
a8e0511b32
Rollup merge of #71688 - ecstatic-morse:const-downcast, r=oli-obk
Allow `Downcast` projections unconditionally in const-checking

`ProjectionElem::Downcast` sounds scary, but it's really just the projection we use to access a particular enum variant. They usually appear in the lowering of a `match` statement, so they have been associated with control flow in const-checking, but they don't do any control flow by themselves. We already have a HIR pass that looks for `if` and `match` (even ones that have 1 or fewer reachable branches). That pass is double-checked by a MIR pass that looks for `SwitchInt`s and `FakeRead`s for match scrutinees. In my opinion, there's no need to look for `Downcast` as well.

r? @oli-obk
2020-04-30 15:23:17 -07:00
Tyler Mandry
8192cb6ea3
Rollup merge of #71682 - ehuss:bump-pulldown-cmark, r=Dylan-DPC
Bump pulldown-cmark

Pulls in 0.7.1 with the following fixes:

- Update html5ever to 0.25
- Fix hang on unclosed html element

Closes #70871
2020-04-30 15:23:15 -07:00
Tyler Mandry
3c75f70170
Rollup merge of #71590 - RalfJung:mir-dump-pointers, r=oli-obk
MIR dump: print pointers consistently with Miri output

This makes MIR allocation dump pointer printing consistent with Miri output: both use hexadecimal offsets with a `0x` prefix. To save some space, MIR dump replaces the `alloc` prefix by `a` when necessary.

I also made AllocId/Pointer printing more consistent in their Debug/Display handling, and adjusted Display printing for Scalar a bit to avoid using decimal printing when we do not know the sign with which to interpret the value (IMO using decimal then is misleading).
2020-04-30 15:23:13 -07:00
Tyler Mandry
01fffff677
Rollup merge of #71567 - Mark-Simulacrum:no-success, r=matthiaskrgr
Handle build completion message from Cargo

This was introduced in the recent bump to 1.44 bootstrap cargo

Fixes #71561.
2020-04-30 15:23:12 -07:00
Tyler Mandry
94433a60fb
Rollup merge of #71465 - oli-obk:is_thread_local_cleanup, r=matthewjasper
Add a convenience method on `TyCtxt` for checking for thread locals

This PR extracts the cleanup part of #71192

r? @bjorn3
2020-04-30 15:23:10 -07:00
Tyler Mandry
4adebb9f29
Rollup merge of #71148 - bluss:vec-drop-raw-slice, r=RalfJung
Vec drop and truncate: drop using raw slice *mut [T]

By creating a *mut [T] directly (without going through &mut [T]), avoid
questions of validity of the contents of the slice.

Consider the following risky code:

```rust
unsafe {
    let mut v = Vec::<bool>::with_capacity(16);
    v.set_len(16);
}
```

The intention is that with this change, we avoid one of the soundness
questions about the above snippet, because Vec::drop no longer
produces a mutable slice of the vector's contents.

r? @RalfJung
2020-04-30 15:23:08 -07:00
Eduard-Mihai Burtescu
05a872df2b wf: {Int,Float}Var can only infer to always-WF ints/floats. 2020-04-30 23:01:26 +03:00
Eduard-Mihai Burtescu
d1dc2afd05 wf: handle "livelock" checking before reaching WfPredicates::compute. 2020-04-30 23:01:22 +03:00
Tyler Mandry
2bafb1b1d7 Update backtrace-sys
Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)
2020-04-30 12:32:53 -07:00
bors
7ced01a730 Auto merge of #71717 - Dylan-DPC:rollup-av5vjor, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #70950 (extend NLL checker to understand `'empty` combined with universes)
 - #71433 (Add help message for missing right operand in condition)
 - #71449 (Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer`)
 - #71559 (Detect git version before attempting to use --progress)
 - #71597 (Rename Unique::empty() -> Unique::dangling())

Failed merges:

r? @ghost
2020-04-30 19:01:01 +00:00