varkor
5851d624ae
Fix UI test fallout
2020-09-26 20:14:16 +01:00
Stein Somers
3e485d7cf5
BTreeMap: keep an eye out on the size of the main components
2020-09-26 20:07:48 +02:00
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
Jonas Schievink
cc2ba3bd27
Add a test for 128-bit return values
2020-09-26 17:08:55 +02: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
5d359db9cf
Remove all unstable feature support in the missing_const_for_fn
lint
2020-09-26 16:23:56 +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
7dda2c4218
Normalise BITS
in UI test
2020-09-26 13:34:55 +01:00
varkor
b484e584ec
Bless mir-opt 32-bit tests
2020-09-26 13:34:55 +01:00
varkor
387e3ddded
Bless mir-opt tests
2020-09-26 13:34:53 +01: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
259e9477f4
Rollup merge of #77207 - camelid:whence-to-span, r=jyn514
...
Rename `whence` to `span`
It's called `span` elsewhere in the compiler and `span` is also less
surprising. `whence` is whimsical, but not super clear :)
See [this Discord conversation](https://discord.com/channels/442252698964721669/459149231702278154/758731658689511444 ) for more.
r? @jyn514
2020-09-26 12:58:32 +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
0a19836a81
Rollup merge of #77181 - GuillaumeGomez:add-pointer-alias, r=jyn514,pickfire
...
Add doc alias for pointer primitive
2020-09-26 12:58:28 +02:00
Ralf Jung
f614ae4a30
Rollup merge of #77166 - RalfJung:miri, r=RalfJung
...
update Miri
Fixes https://github.com/rust-lang/rust/issues/77130
2020-09-26 12:58:26 +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
7ff5b44a58
Rollup merge of #77127 - camelid:update-mdbook, r=Dylan-DPC
...
Update mdBook
0.4.2 -> 0.4.3
Also updated version requirement in `Cargo.toml` from 0.4.0 to 0.4.3.
2020-09-26 12:58:22 +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
31fd0ad69f
Rollup merge of #77076 - GuillaumeGomez:missing-code-examples-slice-iter, r=Dylan-DPC
...
Add missing code examples on slice iter types
r? @Dylan-DPC
2020-09-26 12:58:15 +02:00
Ralf Jung
c39598aeea
Rollup merge of #76631 - jyn514:x.py-setup, r=Mark-Simulacrum
...
Add `x.py setup`
Closes #76503 .
- Suggest `x.py setup` if config.toml doesn't exist yet
- Prompt for a profile if not given on the command line
- Print the configuration that will be used
- Print helpful starting commands after setup
- Link to the dev-guide after finishing
2020-09-26 12:58:13 +02:00
Ralf Jung
1e62382a4f
Rollup merge of #75454 - ltratt:option_optimisation_guarantees, r=dtolnay
...
Explicitly document the size guarantees that Option makes.
Triggered by a discussion on wg-unsafe-code-guidelines about which layouts of `Option<T>` one can guarantee are optimised to a single pointer.
CC @RalfJung
2020-09-26 12:58:12 +02:00
Ralf Jung
6f881b3b7d
might_permit_raw_init: also check aggregate fields
2020-09-26 12:29:01 +02:00
Mara Bos
6b8b9c4adb
Disable stdout-during-shutdown test on emscripten.
2020-09-26 12:10:49 +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
Guillaume Gomez
21ee1716ee
Add doc alias for pointer primitive
2020-09-26 11:21:24 +02: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
Lzu Tao
dce7248a39
Remove unneeded tidy comment
2020-09-26 05:20:53 +00:00
Lzu Tao
37cd79cd32
Gather all ZST structs of str together
2020-09-26 05:20:53 +00:00
Lzu Tao
653b5bf18c
Move functions converting bytes to str to new mod
2020-09-26 05:20:53 +00:00
Lzu Tao
90c813a0f0
Move utf-8 validating helpers to new mod
2020-09-26 05:20:53 +00:00
Lzu Tao
5f0d724e29
Move str's impl of iterations to new mod
2020-09-26 05:20:51 +00:00
Lzu Tao
5b533fccf3
Move traits implementation of str to new mod
...
Also move FromStr trait
2020-09-26 05:04:58 +00:00
Lzu Tao
d31ca4fc8e
Move Utf8Error to new mod
2020-09-26 05:04:58 +00:00