Dylan DPC
15359b0d57
Rollup merge of #70406 - GuillaumeGomez:cleanup-e0458, r=Dylan-DPC
...
Clean up E0458 explanation
r? @Dylan-DPC
2020-03-25 23:53:01 +01:00
Dylan DPC
0fa57e4595
Rollup merge of #70392 - brain0:fixxpy, r=Mark-Simulacrum
...
Make x.py compatible with python 3.8.
Python 3.8 removes the `time.clock()` function, use `time.perf_counter()` instead.
2020-03-25 23:52:59 +01:00
Dylan DPC
818da9eb4d
Rollup merge of #69700 - anyska:layout-details-rename, r=oli-obk
...
Rename LayoutDetails to just Layout.
2020-03-25 23:52:57 +01:00
Olivier Goffart
81006f644d
Optimize slightly by avoiding to call Niche::reserve when not needed
2020-03-25 23:08:36 +01:00
Olivier Goffart
4d77d01096
Fix for #62691 : use the largest niche across all fields
...
fixes #62691
2020-03-25 23:08:23 +01:00
Ben Boeckel
1dc722c292
gitignore: allow target to be a symlink
...
Following rust-lang/cargo#4944 .
2020-03-25 17:30:40 -04:00
Santiago Pastorino
5884c9d08f
Revert "Automatically tag as nominated for T-compiler"
...
This reverts commit 46a8fcdf3c
.
2020-03-25 17:15:12 -03:00
Guillaume Gomez
eaa93c0171
Clean up E0458 explanation
2020-03-25 20:49:36 +01:00
bors
a5fb9ae5b2
Auto merge of #70404 - Dylan-DPC:rollup-iikcm6r, r=Dylan-DPC
...
Rollup of 5 pull requests
Successful merges:
- #70226 (use checked casts and arithmetic in Miri engine)
- #70319 (correctly normalize constants)
- #70352 (Add long error explanation for E0710 )
- #70366 (Implement Fuse with Option)
- #70379 (fix incorrect type name in doc comments)
Failed merges:
- #70375 (avoid catching InterpError)
r? @ghost
2020-03-25 19:42:22 +00:00
Dylan DPC
9a9cb2d372
Rollup merge of #70379 - JOE1994:patch-2, r=petrochenkov
...
fix incorrect type name in doc comments
Change : `InterpCtx` => `InterpCx`
(`rustc_mir::interpret::InterpCx`)
2020-03-25 19:28:14 +01:00
Dylan DPC
530c320e75
Rollup merge of #70366 - cuviper:option-fuse, r=dtolnay
...
Implement Fuse with Option
The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.
The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.
r? @scottmcm
2020-03-25 19:28:12 +01:00
Dylan DPC
3586ab615e
Rollup merge of #70352 - bishtpawan:doc/61137-add-long-error-code-e0710, r=Dylan-DPC
...
Add long error explanation for E0710
Add long explanation for the E0710 error code
Part of #61137
r? @GuillaumeGomez
2020-03-25 19:28:11 +01:00
Dylan DPC
1154023118
Rollup merge of #70319 - lcnr:issue63695, r=eddyb
...
correctly normalize constants
closes #70317
implements https://github.com/rust-lang/rust/issues/70125#issuecomment-602133708
r? eddyb cc @varkor
2020-03-25 19:28:09 +01:00
Dylan DPC
97f0a9ef8d
Rollup merge of #70226 - RalfJung:checked, r=oli-obk
...
use checked casts and arithmetic in Miri engine
This is unfortunately pretty annoying because we have to cast back and forth between `u64` and `usize` more often that should be necessary, and that cast is considered fallible.
For example, should [this](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/interpret/value/enum.ConstValue.html ) really be `usize`?
Also, `LayoutDetails` uses `usize` for field indices, but in Miri we use `u64` to be able to also handle array indexing. Maybe methods like `mplace_field` should be suitably generalized to accept both `u64` and `usize`?
r? @oli-obk Cc @eddyb
2020-03-25 19:28:08 +01:00
Josh Stone
4f429c074b
impl TrustedRandomAccess for Fuse without FusedIterator
2020-03-25 11:09:00 -07:00
Eric Huss
21ecb0d573
Update cargo.
2020-03-25 09:03:01 -07:00
Thomas Bächler
a9484d4647
Make x.py compatible with python 3.8.
...
Python 3.8 removes the time.clock() function, use time.perf_counter() instead.
2020-03-25 16:11:46 +01:00
Bastian Kauschke
f8e3da5ea2
run test only on 64bit
2020-03-25 16:07:36 +01:00
Ana-Maria Mihalache
0f7840b89b
Rename LayoutDetails to just Layout.
2020-03-25 15:06:48 +00:00
Ralf Jung
7400955e94
add usize methods for Size getters
2020-03-25 15:53:53 +01:00
Ralf Jung
b7db7320ad
go back to infix ops for Size
2020-03-25 15:53:53 +01:00
Ralf Jung
1d67ca00a1
add helper method for ptr ops on Scalar; reduce unnecessary large operand of overflowing_signed_offset
2020-03-25 15:53:53 +01:00
Ralf Jung
afcb6342fa
use Size addition instead of checked int addition
2020-03-25 15:53:52 +01:00
Ralf Jung
0bc108a13b
make Size::from* methods generic in the integer type they accept
2020-03-25 15:53:52 +01:00
Ralf Jung
f16b491015
remove unnecessary cast
2020-03-25 15:53:52 +01:00
Ralf Jung
d7e2650db2
miri: avoid a bunch of casts by offering usized-based field indexing
2020-03-25 15:53:52 +01:00
Ralf Jung
cd15b659c7
avoid double-cast in mplace_field
2020-03-25 15:53:52 +01:00
Ralf Jung
9de600892d
make bit_width return u64, consistently with other sizes in the compiler
2020-03-25 15:53:52 +01:00
Ralf Jung
1ddbdc6269
use checked casts and arithmetic in Miri engine
2020-03-25 15:53:52 +01:00
Ralf Jung
5be304b0b4
miri: simplify shift operator overflow checking
2020-03-25 15:48:53 +01:00
bors
3c1d9adb3c
Auto merge of #70297 - nnethercote:clean-up-debugging-options, r=michaelwoerister
...
Clean up debugging options
I found various sub-optimal things when I was looking at option handling.
2020-03-25 14:46:51 +00:00
Mazdak Farrokhzad
c70aa344e4
borrowck: prefer "value" over "_
".
2020-03-25 11:42:25 +01:00
Mazdak Farrokhzad
bd3482632e
simplify check_pat_tuple_struct
2020-03-25 09:32:39 +01:00
Ralf Jung
b5343d6baa
rename def_id -> static_def_id
2020-03-25 08:47:59 +01:00
Ralf Jung
4920a3371f
better explain GLOBAL_KIND choice
2020-03-25 08:46:58 +01:00
Mazdak Farrokhzad
bd156846fa
improve non-exhaustive struct pat error
2020-03-25 08:35:17 +01:00
Mazdak Farrokhzad
58fee523cf
is_union() instead of string comparsion
2020-03-25 07:02:30 +01:00
bishtpawan
5c65568f0b
update tool_lints
2020-03-25 11:32:23 +05:30
bors
cdb50c6f25
Auto merge of #70383 - Centril:rollup-hmfft3y, r=Centril
...
Rollup of 7 pull requests
Successful merges:
- #70331 (Increase verbosity when using update syntax with private fields)
- #70349 (move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code)
- #70361 (Update backtrace crate to 0.3.46)
- #70364 (resolve: Remove `rustc_attrs` as a standalone feature gate)
- #70369 (Fix smaller issues with invalid placeholder type errors)
- #70373 (normalize some imports & prefer direct ones)
- #70376 (Add test for #66312 )
Failed merges:
r? @ghost
2020-03-25 05:46:43 +00:00
Mazdak Farrokhzad
83fc855d03
Rollup merge of #70376 - tmandry:issue-66312, r=Centril
...
Add test for #66312
Closes #66312 . This issue was fixed by #68884 .
r? @Zoxc
2020-03-25 06:45:38 +01:00
Mazdak Farrokhzad
d894f5eaf5
Rollup merge of #70373 - Centril:canon-imports, r=Mark-Simulacrum
...
normalize some imports & prefer direct ones
r? @Mark-Simulacrum
2020-03-25 06:45:36 +01:00
Mazdak Farrokhzad
cb17049b36
Rollup merge of #70369 - estebank:bad-placeholder-in-where, r=Centril
...
Fix smaller issues with invalid placeholder type errors
Follow up to #70294 .
- Fix placement of suggested generic param when bounds are present.
- Reduce error duplication for invalid placeholder types in `fn` types.
r? @Centril
2020-03-25 06:45:35 +01:00
Mazdak Farrokhzad
3d0976a91b
Rollup merge of #70364 - petrochenkov:nofrustc, r=Centril
...
resolve: Remove `rustc_attrs` as a standalone feature gate
Now it only gates specific built-in attributes.
So if you want to make a rustc attribute, make it a built-in (this was already the case in practice for some time).
2020-03-25 06:45:33 +01:00
Mazdak Farrokhzad
3cced917ff
Rollup merge of #70361 - tmiasko:backtrace, r=Mark-Simulacrum
...
Update backtrace crate to 0.3.46
* Support line-tables-only when using libbacktrace
* Update libbacktrace to latest master
* Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434
2020-03-25 06:45:32 +01:00
Mazdak Farrokhzad
8aafb8a51f
Rollup merge of #70349 - Centril:hir-outa-rustc, r=Zoxc
...
move `hir_id_validation` to `rustc_passes` + simplify `hir::map` code
r? @Zoxc
2020-03-25 06:45:30 +01:00
Mazdak Farrokhzad
d03c02a589
Rollup merge of #70331 - jeremystucki:privacy, r=estebank
...
Increase verbosity when using update syntax with private fields
Resolves #70323
2020-03-25 06:45:27 +01:00
Nicholas Nethercote
e1d1db790f
Remove TargetOptions::embed_bitcode
.
...
It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
2020-03-25 14:09:27 +11:00
Youngsuk Kim
bedc3587ce
fix type name typo in doc comments
...
InterpCtx => InterpCx
(rustc_mir::interpret::InterpCx)
2020-03-24 21:34:36 -04:00
Esteban Küber
7534efa0ef
Reduce error duplication for invalid placeholder types in fn types
2020-03-24 18:01:37 -07:00
Tyler Mandry
1a21c28e39
Add test for #66312
...
Closes #66312 . This issue was fixed by #68884 .
2020-03-24 16:44:45 -07:00