bors
e37c99fa1c
Auto merge of #77224 - RalfJung:rollup-hdvb96c, r=RalfJung
...
Rollup of 12 pull requests
Successful merges:
- #75454 (Explicitly document the size guarantees that Option makes.)
- #76631 (Add `x.py setup`)
- #77076 (Add missing code examples on slice iter types)
- #77093 (merge `need_type_info_err(_const)`)
- #77122 (Add `#![feature(const_fn_floating_point_arithmetic)]`)
- #77127 (Update mdBook)
- #77161 (Remove TrustedLen requirement from BuilderMethods::switch)
- #77166 (update Miri)
- #77181 (Add doc alias for pointer primitive)
- #77204 (Remove stray word from `ClosureKind::extends` docs)
- #77207 (Rename `whence` to `span`)
- #77211 (Remove unused #[allow(...)] statements from compiler/)
Failed merges:
- #77170 (Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]`)
r? `@ghost`
2020-09-26 17:50:26 +00:00
Vadim Petrochenkov
fe3e5aa729
pretty-print-reparse hack: Remove an impossible case
...
Delimiters cannot appear as isolated tokens in a token stream
2020-09-26 20:27:14 +03:00
Vadim Petrochenkov
275bf626f6
pretty-print-reparse hack: Rename some variables for clarity
2020-09-26 20:27:09 +03:00
Matthew Jasper
3a81adeca2
Call type_of for opaque types later in compilation
...
This ensures that various wf checks have already been done before we
typeck item bodies.
2020-09-26 17:56:03 +01:00
Aaron Hill
b9653568a7
Encode less metadata for proc-macro crates
...
Currently, we serialize the same crate metadata for proc-macro crates as
we do for normal crates. This is quite wasteful - almost none of this
metadata is ever used, and much of it can't even be deserialized (if it
contains a foreign `CrateNum`).
This PR changes metadata encoding to skip encoding the majority of crate
metadata for proc-macro crates. Most of the `Lazy<[T]>` fields are left
completetly empty, while the non-lazy fields are left as-is.
Additionally, proc-macros now have a def span that does not include
their body. This was done for normal functions in #75465 , but was missed
for proc-macros.
As a result of this PR, we should only ever encode local `CrateNum`s
when encoding proc-macro crates. I've added a specialized serialization
impl for `CrateNum` to assert this.
2020-09-26 12:26:27 -04:00
Matthew Jasper
ef83742b2b
Delay bug for non-universal regions in member constraints
2020-09-26 17:16:25 +01:00
Tomasz Miąsko
57d38975cc
liveness: Use newtype_index for Variable and LiveNode
2020-09-26 16:44:41 +02:00
Tomasz Miąsko
49d1ce00f3
liveness: Remove unnecessary local variable exit_ln
2020-09-26 16:44:28 +02:00
Oliver Scherer
1b843896c8
Move qualify_min_const_fn out of rustc into clippy
2020-09-26 16:08:24 +02:00
Tomasz Miąsko
141b91da6c
liveness: Inline contents of specials struct
2020-09-26 15:38:56 +02:00
Tomasz Miąsko
70f150b51e
liveness: Delay conversion from a symbol to a string until linting
2020-09-26 15:38:51 +02:00
Tomasz Miąsko
2fb1564457
liveness: Remove redundant fields for a number of live nodes and variables
2020-09-26 15:38:30 +02:00
Tomasz Miąsko
9b5835ec79
liveness: Remove redundant debug logging
...
The IrMaps::add_variable already contains debug logging. Don't duplicate it.
2020-09-26 15:38:22 +02:00
Jonas Schievink
4c5acc4ed7
Return values up to 128 bits in registers
2020-09-26 15:34:26 +02:00
Oliver Scherer
455f284496
Deduplicate and generalize some (de/)serializer impls
2020-09-26 14:55:42 +02:00
varkor
94c789b275
char not char
2020-09-26 13:34:49 +01:00
varkor
8eb42ba0fb
Make invalid integer operation messages consistent
2020-09-26 13:34:49 +01:00
Ralf Jung
9e02642fb3
Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obk
...
Remove unused #[allow(...)] statements from compiler/
2020-09-26 12:58:34 +02:00
Ralf Jung
67f8c5914f
Rollup merge of #77204 - LingMan:patch-3, r=jonas-schievink
...
Remove stray word from `ClosureKind::extends` docs
2020-09-26 12:58:30 +02:00
Ralf Jung
7c47b1e5f4
Rollup merge of #77161 - est31:swich_len_already_trusted, r=petrochenkov
...
Remove TrustedLen requirement from BuilderMethods::switch
The main use case of TrustedLen is allowing APIs to specialize on it,
but no use of it uses that specialization. Instead, only the .len()
function provided by ExactSizeIterator is used, which is already
required to be accurate.
Thus, the TrustedLen requirement on BuilderMethods::switch is redundant.
2020-09-26 12:58:24 +02:00
Ralf Jung
3b544e73ae
Rollup merge of #77122 - ecstatic-morse:const-fn-arithmetic, r=RalfJung,oli-obk
...
Add `#![feature(const_fn_floating_point_arithmetic)]`
cc #76618
This is a template for splitting up `const_fn` into granular feature gates. I think this will make it easier, both for us and for users, to track stabilization of each individual feature. We don't *have* to do this, however. We could also keep stabilizing things out from under `const_fn`.
cc @rust-lang/wg-const-eval
r? @oli-obk
2020-09-26 12:58:20 +02:00
Ralf Jung
ac8169dc10
Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkor
...
merge `need_type_info_err(_const)`
I hoped that this would automatically solve #76737 but it doesn't quite seem like it
fixes #77092
r? @varkor
2020-09-26 12:58:17 +02:00
Ralf Jung
6f881b3b7d
might_permit_raw_init: also check aggregate fields
2020-09-26 12:29:01 +02:00
bors
6f9a8a7f9b
Auto merge of #76485 - estebank:format_arg_capture_spans, r=davidtwco
...
Point at named argument not found when using `format_args_capture` instead of whole format string
2020-09-26 10:05:49 +00:00
Bastian Kauschke
9a607c0a27
unused into
2020-09-26 10:31:34 +02:00
Bastian Kauschke
32195ac8f4
rename functions
2020-09-26 10:28:15 +02:00
bors
fd15e6180d
Auto merge of #70743 - oli-obk:eager_const_to_pat_conversion, r=eddyb
...
Fully destructure constants into patterns
r? `@varkor`
as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/constants.20in.20patterns/near/192789924
we should probably crater it once reviewed
2020-09-26 06:44:28 +00:00
est31
12187b7f86
Remove unused #[allow(...)] statements from compiler/
2020-09-26 01:25:55 +02:00
Joshua Nelson
58d57f3f5e
Fix documentation highlighting in ty::BorrowKind
...
Previously it looked a little odd: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.BorrowKind.html#variant.UniqueImmBorrow
2020-09-25 18:54:05 -04:00
marmeladema
5946c12476
Move is_raw_guess check in ty::print::pretty
2020-09-25 22:48:44 +01:00
marmeladema
35bad3edbf
Address review comment
2020-09-25 22:48:44 +01:00
marmeladema
f25d0bc559
Remove now unused double_braced_* symbols
2020-09-25 22:46:15 +01:00
marmeladema
23085b6360
Fix profiling query key creation
2020-09-25 22:46:15 +01:00
marmeladema
bb8e1764bb
Simplify some match statements on `DefPathDataName'
2020-09-25 22:46:15 +01:00
marmeladema
75130b06bf
Avoid calling Symbol::interner in compute_codegen_unit_name
2020-09-25 22:46:15 +01:00
marmeladema
657ecdb75e
Rename DefPathData::get_name() to DefPathData::name()
2020-09-25 22:46:15 +01:00
marmeladema
2708ad8bb4
Fix pretty-printing of DisambiguatedDefPathData
2020-09-25 22:46:15 +01:00
marmeladema
9f50c49117
Implement Display for DisambiguatedDefPathData and DefPathData
2020-09-25 22:46:15 +01:00
marmeladema
f1878d19fa
Move from {{closure}}#0 syntax to {closure#0} for (def) path components
2020-09-25 22:46:14 +01:00
LingMan
900daba2cb
Remove stray word from ClosureKind::extends docs
2020-09-25 23:35:07 +02:00
Dylan MacKenzie
76c6f2dc3f
No need to call is_min_const_fn for side-effects
2020-09-25 14:31:32 -07:00
Dylan MacKenzie
11bfc60a4b
Change error in fn_queries to delay_span_bug
...
This should be caught by the new check in `rustc_passes`. At some point,
this function will be removed entirely.
2020-09-25 14:31:32 -07:00
Dylan MacKenzie
61d86fa06c
Check for missing const-stability attributes in stability
...
This used to happen as a side-effect of `is_min_const_fn`, which was
subtle.
2020-09-25 14:31:32 -07:00
bors
c6e4db620a
Auto merge of #77198 - jonas-schievink:rollup-i59i41h, r=jonas-schievink
...
Rollup of 15 pull requests
Successful merges:
- #76932 (Relax promises about condition variable.)
- #76973 (Unstably allow assume intrinsic in const contexts)
- #77005 (BtreeMap: refactoring around edges)
- #77066 (Fix dest prop miscompilation around references)
- #77073 (dead_code: look at trait impls even if they don't contain items)
- #77086 (Include libunwind in the rust-src component.)
- #77097 (Make [].as_[mut_]ptr_range() (unstably) const.)
- #77106 (clarify that `changelog-seen = 1` goes to the beginning of config.toml)
- #77120 (Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts)
- #77126 (Invalidate local LLVM cache less often)
- #77146 (Install std for non-host targets)
- #77155 (remove enum name from ImplSource variants)
- #77176 (Removing erroneous semicolon in transmute documentation)
- #77183 (Allow multiple allow_internal_unstable attributes)
- #77189 (Remove extra space from vec drawing)
Failed merges:
r? `@ghost`
2020-09-25 19:35:33 +00:00
Eric Huss
c29a29cba0
Defer Apple SDKROOT detection to link time.
2020-09-25 12:07:46 -07:00
Jonas Schievink
12b8d8943d
Rollup merge of #77183 - bugadani:issue-77088, r=varkor
...
Allow multiple allow_internal_unstable attributes
Fixes #77088
2020-09-25 19:42:52 +02:00
Jonas Schievink
e739468f97
Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morse
...
remove enum name from ImplSource variants
This is quite a lot cleaner in my opinion.
2020-09-25 19:42:48 +02:00
Jonas Schievink
ba44e9fe34
Rollup merge of #77073 - lcnr:ty-trait-param, r=matthewjasper
...
dead_code: look at trait impls even if they don't contain items
fixes #70225
2020-09-25 19:42:35 +02:00
Jonas Schievink
452aa759b7
Rollup merge of #77066 - jonas-schievink:dest-prop-borrow, r=oli-obk
...
Fix dest prop miscompilation around references
Closes https://github.com/rust-lang/rust/issues/77002
2020-09-25 19:42:33 +02:00
Jonas Schievink
1b8c939a8d
Rollup merge of #76973 - lzutao:unstably-const-assume, r=oli-obk
...
Unstably allow assume intrinsic in const contexts
Not sure much about this usage because there are concerns
about [blocking optimization][1] and [slowing down LLVM][2] when using `assme` intrinsic
in inline functions.
But since Oli suggested in https://github.com/rust-lang/rust/issues/76960#issuecomment-695772221 ,
here we are.
[1]: https://github.com/rust-lang/rust/pull/54995#issuecomment-429302709
[2]: https://github.com/rust-lang/rust/issues/49572#issuecomment-589615423
2020-09-25 19:42:29 +02:00