Commit Graph

109361 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
16e9d3f0ca
Rollup merge of #70395 - ehuss:update-cargo, r=ehuss
Update cargo.

8 commits in 7019b3ed3d539db7429d10a343b69be8c426b576..8a0d4d9c9abc74fd670353094387d62028b40ae9
2020-03-17 21:02:00 +0000 to 2020-03-24 17:57:04 +0000
- Re-implement proc-macro feature decoupling. (rust-lang/cargo#8028)
- Remove unused transitive dependencies: miniz_oxide, adler32 (rust-lang/cargo#8023)
- Fix bug with -Zfeatures=dev_dep and `check --profile=test`. (rust-lang/cargo#8027)
- Remove Config from CompileOptions. (rust-lang/cargo#8021)
- Add `rustless.org` to documented blocklist. (rust-lang/cargo#7922)
- Print colored warnings when build script panics (rust-lang/cargo#8017)
- Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS (rust-lang/cargo#8014)
- Add proc-macro to index, and new feature resolver. (rust-lang/cargo#8003)
2020-03-26 03:21:33 +01:00
Mazdak Farrokhzad
7db48250cd
Rollup merge of #70389 - Centril:borrowck-no-underscores, r=mark-i-m
borrowck: prefer "value" over "`_`" in diagnostics

Fixes https://github.com/rust-lang/rust/issues/67565.

r? @pnkfelix @matthewjasper
cc @mark-i-m
2020-03-26 03:21:31 +01:00
Mazdak Farrokhzad
ca7dfb1cfa
Rollup merge of #70386 - Centril:patty, r=estebank
typeck: minor pattern typing improvements

r? @estebank
2020-03-26 03:21:30 +01:00
Mazdak Farrokhzad
ef01fe6bbc
Rollup merge of #70375 - RalfJung:check-defined-err, r=oli-obk
avoid catching InterpError

Avoid raising and then capturing `InterpError` for the definedness check.

Cc https://github.com/rust-lang/rust/issues/69297
r? @oli-obk
2020-03-26 03:21:29 +01:00
Mazdak Farrokhzad
9fa4953aa4
Rollup merge of #69878 - estebank:chained-ops, r=Centril
Tweak chained operators diagnostic

Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors

r? @Centril
2020-03-26 03:21:27 +01:00
Mazdak Farrokhzad
b105ac4018
Rollup merge of #69866 - estebank:guess_head_span, r=eddyb
Rename `def_span` to `guess_head_span`

r? @eddyb
2020-03-26 03:21:26 +01:00
Mazdak Farrokhzad
da10963357 typeck/pat: address review comments 2020-03-26 02:29:42 +01:00
Mazdak Farrokhzad
632c0af38f borrowck diagnostics: address review comments. 2020-03-26 02:13:17 +01:00
Esteban Küber
4832f3fd5d review comments 2020-03-25 18:10:18 -07:00
Esteban Küber
89571a1bbc Tweak chained operators diagnostic
Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors
2020-03-25 17:13:04 -07:00
Esteban Küber
f18a6dcec0 Rename def_span to guess_head_span 2020-03-25 16:45:12 -07:00
Olivier Goffart
bb3e513a2c Revert previous commit and make the optimisation in a nicer way 2020-03-26 00:20:39 +01:00
Ralf Jung
0fdb7df32b avoid catching InterpError 2020-03-26 00:16:05 +01:00
bors
e4519e2b96 Auto merge of #70412 - Dylan-DPC:rollup-yuq2mfy, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #69700 (Rename LayoutDetails to just Layout.)
 - #70392 (Make x.py compatible with python 3.8.)
 - #70406 (Clean up E0458 explanation)
 - #70407 (Avoid tagging as I-nominated on toolstate breakage)
 - #70409 (gitignore: allow target to be a symlink)

Failed merges:

 - #70375 (avoid catching InterpError)

r? @ghost
2020-03-25 22:56:53 +00:00
Dylan DPC
84a2865963
Rollup merge of #70409 - mathstuf:gitignore-target-symlink, r=Mark-Simulacrum
gitignore: allow target to be a symlink

Following rust-lang/cargo#4944.
2020-03-25 23:53:04 +01:00
Dylan DPC
5bccef5d86
Rollup merge of #70407 - spastorino:avoid-nomination-on-toolstate-breakage, r=Mark-Simulacrum
Avoid tagging as I-nominated on toolstate breakage

r? @Mark-Simulacrum
2020-03-25 23:53:03 +01:00
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