Commit Graph

128276 Commits

Author SHA1 Message Date
Oliver Scherer
1b1b6eabaa Remove the "lift constant to reference" logic 2020-09-23 16:28:45 +02:00
Matthias Krüger
b5d47bfa3a clarify that changelog-seen = 1 goes to the beginning of config.toml
Fixes #77105
2020-09-23 15:45:35 +02:00
bors
a6008fac97 Auto merge of #77090 - rust-lang:revert-76110-convert-openoptions-cint, r=dtolnay
Revert "Function to convert OpenOptions to c_int"

Reverts rust-lang/rust#76110. This broke Rust's stability guarantees.

Closes https://github.com/rust-lang/rust/issues/77089.

r? `@joshtriplett`
2020-09-23 13:19:18 +00:00
Dylan DPC
c3c03f2f05
Rollup merge of #77055 - est31:more_track_caller, r=Mark-Simulacrum
Add #[track_caller] to more panicking Cell functions

Continuation of #74526

Adds the #[track_caller] attribute to almost all panicking Cell
functions. The ones that borrow two Cells in their function
body are spared, because the panic location helps pinpoint
which of the two borrows failed. You'd need to have
full debuginfo and backtraces enabled together with column
info in order to be able to discern the cases.
Column info in debuginfo is only available on non-Windows platforms.
2020-09-23 14:54:15 +02:00
Dylan DPC
f8dec3d054
Rollup merge of #77047 - RalfJung:miri-dealloc, r=oli-obk
Miri: more informative deallocation error messages

Make sure we show the affected AllocId.

r? @oli-obk
2020-09-23 14:54:13 +02:00
Dylan DPC
049ba0c6f0
Rollup merge of #77042 - imbolc:patch-2, r=kennytm
Improve documentation for ToSocketAddrs

I little clarification
2020-09-23 14:54:11 +02:00
Dylan DPC
b76343643d
Rollup merge of #77017 - GuillaumeGomez:vec-missing-examples-iter, r=Dylan-DPC
Add missing examples on Vec iter types

r? @Dylan-DPC
2020-09-23 14:54:10 +02:00
Dylan DPC
bcdbe79f0c
Rollup merge of #76994 - yuk1ty:fix-small-typo, r=estebank
fix small typo in docs and comments

Fixed `the the` to `the`, as far as I found.
2020-09-23 14:54:07 +02:00
Dylan DPC
a40d79c9fb
Rollup merge of #76993 - blitzerr:alloc-ref, r=Amanieu
Changing the alloc() to accept &self instead of &mut self

Fixes: [#55](https://github.com/rust-lang/wg-allocators/issues/55)

This is the first cut. It only makes the change for `alloc` method.
2020-09-23 14:54:06 +02:00
Dylan DPC
eaaf5d7e38
Rollup merge of #76965 - fusion-engineering-forks:fix-atomic-from-mut, r=Amanieu
Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut.

Fixes some platform-specific problems with #74532 by using the actual alignment of the types instead of hardcoding a few `target_arch`s.

r? @RalfJung
2020-09-23 14:54:04 +02:00
Dylan DPC
98e5ee7df0
Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obk
emit errors during AbstractConst building

There changes are currently still untested, so I don't expect this to pass CI 😆

It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this.

r? @oli-obk
2020-09-23 14:54:02 +02:00
Dylan DPC
a22eb31668
Rollup merge of #76898 - Aaron1011:fix/item-def-span, r=oli-obk
Record `tcx.def_span` instead of `item.span` in crate metadata

This was missed in PR #75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
2020-09-23 14:54:00 +02:00
Bastian Kauschke
ed97b42105 add tracking issue 2020-09-23 13:48:21 +02:00
bors
33aa8be8b5 Auto merge of #76864 - est31:downloaded_llvm_no_clone_sources, r=Mark-Simulacrum
Don't download/sync llvm-project submodule if download-ci-llvm is set

llvm-project takes > 1GB storage space and a long time to download.
It's better to not download it unless needed.
2020-09-23 10:38:18 +00:00
Mara Bos
631c688350 Make [].as_[mut_]ptr_range() (unstably) const. 2020-09-23 11:09:10 +02:00
Bastian Kauschke
0e84b61053 use relevant span when unifying ConstVarValues 2020-09-23 11:00:44 +02:00
Bastian Kauschke
3dbfdb0182 use the correct span when dealing with inference variables 2020-09-23 10:44:11 +02:00
bors
feca2c229e Auto merge of #76659 - simonvandel:76432, r=oli-obk
SimplifyComparisonIntegral: fix miscompilation

Fixes #76432
Only insert StorageDeads if we actually removed one.
Fixes an issue where we added StorageDead to a place with no StorageLive

r? `@oli-obk`
2020-09-23 08:23:00 +00:00
Bastian Kauschke
0abb1abf04 unused path 2020-09-23 10:06:32 +02:00
Bastian Kauschke
45d92b43e3 merge need_type_info_err(_const) 2020-09-23 09:24:58 +02:00
Jacob Hughes
98eab09cf4 Add enum and type alias tests for generic default stability 2020-09-23 02:14:42 -04:00
Andreas Jonson
6586c37bec Move MiniSet to data_structures
remove the need for T to be copy from MiniSet as was done for MiniMap
2020-09-23 08:09:16 +02:00
bors
f6d59207ad Auto merge of #76850 - ecstatic-morse:const-checking-refactor, r=oli-obk
Remove `qualify_min_const_fn`

~~Blocked on #76807 (the first six commits).~~

With this PR, all checks in `qualify_min_const_fn` are replicated in `check_consts`, and the former is no longer invoked. My goal was to have as few changes to test output as possible, since making sweeping changes to the code *while* doing big batches of diagnostics updates turned out to be a headache. To this end, there's a few `HACK`s in `check_consts` to achieve parity with `qualify_min_const_fn`.

The new system that replaces `is_min_const_fn` is referred to as "const-stability"  My end goal for the const-stability rules is this:
* Const-stability is only applicable to functions defined in `staged_api` crates.
* All functions not marked `rustc_const_unstable` are considered "const-stable".
    - NB. This is currently not implemented. `#[unstable]` functions are also const-unstable. This causes problems when searching for feature gates.
    - All "const-unstable" functions have an associated feature gate
* const-stable functions can only call other const-stable functions
     - `allow_internal_unstable` can be used to circumvent this.
* All const-stable functions are subject to some additional checks (the ones that were unique to `qualify_min_const_fn`)

The plan is to remove each `HACK` individually in subsequent PRs. That way, changes to error message output can be reviewed in isolation.
2020-09-23 05:40:35 +00:00
blitzerr
2b19b14cec a few more &mut self -> self changes 2020-09-22 21:04:31 -07:00
blitzerr
985dff9e7e fixing the test failure 2020-09-22 20:16:13 -07:00
Joshua Nelson
15f08d6ddf
Revert "Function to convert OpenOptions to c_int" 2020-09-22 23:07:30 -04:00
Jacob Hughes
3f1b4b39e3 Fix compilation & test failures 2020-09-22 22:54:52 -04:00
Robin Schoonover
6c056d3465 Satisfy rc_buffer lint in Constant::Binary byte string by copying data
We can avoid the data copy again by fixing rustc_ast::ast::LitKind
later.
2020-09-22 20:35:54 -06:00
bors
e62323df22 Auto merge of #77063 - cuviper:llvm-11.0.0-rc3, r=nikic
Rebase LLVM onto 11.0.0-rc3

r? `@nikic`
2020-09-23 02:15:38 +00:00
Avi Dessauer
d281620d8f Test removing unstable default parameter 2020-09-22 21:55:50 -04:00
Avi Dessauer
a73e7d0a4d Test unstable Alloc param on Box 2020-09-22 21:55:47 -04:00
Avi Dessauer
7616b30bff Add unstable default feature enabled test 2020-09-22 21:55:44 -04:00
Avi Dessauer
af19d44921 Add test case demonstrating leak 2020-09-22 21:55:41 -04:00
Avi Dessauer
2793da3f39 Update src/librustc_passes/stability.rs
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:38 -04:00
Avi Dessauer
25dba40cbe Update src/librustc_middle/middle/stability.rs
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:35 -04:00
Avi Dessauer
9eb595705e Update src/librustc_typeck/astconv.rs
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:32 -04:00
Avi Dessauer
41eec9065a Update src/librustc_passes/stability.rs
Co-authored-by: varkor <github@varkor.com>
2020-09-22 21:55:29 -04:00
Avi Dessauer
19e90843a4 Add documentation 2020-09-22 21:55:23 -04:00
Avi Dessauer
3947591ee8 Remove now unneeded check_stability argument 2020-09-22 21:54:16 -04:00
Avi Dessauer
a1892f1a79 Test stability on default parameter of deprecated 2020-09-22 21:54:13 -04:00
Avi Dessauer
f665ccd3a2 Add more tests 2020-09-22 21:54:10 -04:00
Avi Dessauer
cb7264b22a Fix tests 2020-09-22 21:54:07 -04:00
Avi Dessauer
eb7abb9e32 Unstable default types leak in public fields 2020-09-22 21:54:04 -04:00
Avi Dessauer
88b77b6534 Comment out broken tests 2020-09-22 21:54:01 -04:00
Avi Dessauer
8b81a17d73 Uncomment struct tests 2020-09-22 21:53:58 -04:00
Avi Dessauer
a9d6da576b ignore-tidy-linelength generic default stab test
Co-authored-by: Tim Diekmann <21277928+TimDiekmann@users.noreply.github.com>
2020-09-22 21:53:55 -04:00
Avi Dessauer
a7a2086053 Stability annotations on generic trait parameters 2020-09-22 21:53:48 -04:00
Eric Huss
9f27f3796d Include libunwind in the rust-src component. 2020-09-22 17:20:15 -07:00
Ashley Mannix
9b2c8d866e revert const_type_id stabilization
This reverts commit e3856616ee.
2020-09-23 09:40:51 +10:00
LingMan
d76b80768c
Merge two almost identical match arms 2020-09-23 01:09:24 +02:00