Commit Graph

109332 Commits

Author SHA1 Message Date
Ralf Jung
27777e2e7b Miri float->int casts: be explicit that this is saturating 2020-03-26 19:09:31 +01:00
Alex Macleod
40a0fdcb18 Add regression test for #66706 2020-03-26 16:33:18 +00:00
Amanieu d'Antras
1cc521ef9d Update tests to use llvm_asm! 2020-03-26 15:49:22 +00:00
Amanieu d'Antras
d162d096dd Rename asm! to llvm_asm!
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-03-26 15:49:22 +00:00
Amin Arria
ae7fa3042d Add tests based on issue #70372 comments 2020-03-26 12:34:36 -03:00
Amin Arria
5796e6e461 Fix incorrect pattern warning "unreachable pattern"
- Added is_under_guard parameter to _match::is_useful and
  only add to the matrix if false
- Added comments explaining behavior
2020-03-26 12:34:22 -03:00
JOE1994
4538f8953b add 'fn write_u16s'(rustc_mir::interpret::Memory) 2020-03-26 11:01:21 -04:00
Oliver Scherer
c9a5a03ffd Enable --blessing of MIR dumps 2020-03-26 15:26:33 +01:00
Guillaume Gomez
604b7e94e0 Clean up E0459 explanation 2020-03-26 14:21:05 +01:00
Mazdak Farrokhzad
91c68c5fae error_bad_item_kind: add help text 2020-03-26 14:13:50 +01:00
Mateusz Mikuła
f5e702df0e Upgrade rustc and bootstrap dependencies 2020-03-26 14:11:23 +01:00
Mazdak Farrokhzad
b2f7a9502b rustc_hir_pretty: bump recursion_limit 2020-03-26 13:50:02 +01:00
bors
2fbb07525e Auto merge of #70427 - Centril:rollup-lrcad2c, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #68004 (permit negative impls for non-auto traits)
 - #70385 (Miri nits: comment and var name improvement)
 - #70411 (Fix for #62691: use the largest niche across all fields)
 - #70417 (parser: recover on `...` as a pattern, suggesting `..`)
 - #70424 (simplify match stmt)

Failed merges:

r? @ghost
2020-03-26 12:33:18 +00:00
Mazdak Farrokhzad
608715bbd1
Rollup merge of #70424 - lcnr:nit, r=Centril
simplify match stmt

We actually have a surprising amount of
```rust
match expr {
    $($p:pat)|+ => true,
    _ => false,
}
```
While I would prefer this to be replaced with `matches!`, most cases are
fairly readable anyway so we can just let them be for now.
2020-03-26 13:32:20 +01:00
Mazdak Farrokhzad
37e186087c
Rollup merge of #70417 - rakshith-ravi:master, r=Centril
parser: recover on `...` as a pattern, suggesting `..`

Fixes #70388

My first PR to rust. So please let me know if I'm doing something wrong.
2020-03-26 13:32:18 +01:00
Mazdak Farrokhzad
f9d1378dd4
Rollup merge of #70411 - ogoffart:fix-62691, r=eddyb
Fix for #62691: use the largest niche across all fields

fixes #62691

(The second commit is a small optimization but it makes the code less pretty and i don't know if it is worth it.)
2020-03-26 13:32:17 +01:00
Mazdak Farrokhzad
20771ae5b9
Rollup merge of #70385 - RalfJung:miri-nits, r=eddyb
Miri nits: comment and var name improvement

r? @eddyb
2020-03-26 13:32:15 +01:00
Mazdak Farrokhzad
b0a63cb932
Rollup merge of #68004 - nikomatsakis:negative-impls, r=varkor
permit negative impls for non-auto traits

This is a prototype impl that extends `impl !Trait` beyond auto traits. It is not integrated with coherence or anything else, and hence only serves to prevent downstream impls (but not to allow downstream crates to rely on the absence of such impls for coherence purposes).

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

TODO:

- [x] need a test that you can't rely on negative impls for coherence purposes
- [x] test that negative impls cannot specialize positive ones
- [x] test that positive impls cannot specialize negative ones
- [x] extend negative impl to `Clone` in order to fully fix #66544
- [x] and maybe make `CoerceUnsized` unsafe? -- that problem is now split out into https://github.com/rust-lang/rust/issues/68015
- [x] introduce feature flag and prepare a write-up
- [x] improve diagnostics?
2020-03-26 13:32:14 +01:00
Olivier Goffart
0b00c20465 Reorganize a bit the code and add a comment 2020-03-26 13:14:25 +01:00
Niko Matsakis
0d0702623f wip pacify the merciless ui tests 2020-03-26 07:41:26 -04:00
Oliver Scherer
fdc931899d Remove unused argument 2020-03-26 12:20:15 +01:00
Niko Matsakis
011215b2c7 pacify the merciless x.py fmt 2020-03-26 06:52:58 -04:00
Niko Matsakis
c35801e160 use slice pattern instead of calling is_empty() and [0] 2020-03-26 06:52:58 -04:00
Niko Matsakis
b9e09d8f65 add test for negative specializes negative 2020-03-26 06:52:58 -04:00
Niko Matsakis
f5c09ed344 move stderr file too 2020-03-26 06:52:58 -04:00
Niko Matsakis
644b9a0a94 give the negative-impls-builtin test a more sensible name 2020-03-26 06:52:58 -04:00
Niko Matsakis
7107f6e606 comment the typeck-negative-impls-builtin test 2020-03-26 06:52:58 -04:00
Niko Matsakis
f66284778a move feature-gate-negative-impls test to traits/negative-impls 2020-03-26 06:52:58 -04:00
Niko Matsakis
73a55009ac convert to doc comments 2020-03-26 06:52:58 -04:00
Niko Matsakis
68aa798436 bump negative impls version to 1.44.0 2020-03-26 06:52:58 -04:00
Niko Matsakis
cc0d6d03f6 create a tracking issue and link to it 2020-03-26 06:52:57 -04:00
Niko Matsakis
fda3378e3f introduce negative_impls feature gate and document
They used to be covered by `optin_builtin_traits` but negative impls
are now applicable to all traits, not just auto traits.

This also adds docs in the unstable book for the current state of auto traits.
2020-03-26 06:52:55 -04:00
Niko Matsakis
65071708f8 make a custom error for overlap with negative impls 2020-03-26 06:52:26 -04:00
Niko Matsakis
e8a05e201e permit negative impls for non-auto traits 2020-03-26 06:27:45 -04:00
Bastian Kauschke
c21e25c262 simplify match stmt 2020-03-26 10:52:52 +01:00
Mazdak Farrokhzad
b514c42e7b trait_bound_spans -> sized_trait_bound_spans 2020-03-26 09:59:07 +01:00
Camille GILLOT
260cfaba12 Don't allow access to the Session. 2020-03-26 09:40:52 +01:00
Camille GILLOT
d224e214e0 Rename read_query_job -> current_query_job and simplify it. 2020-03-26 09:40:52 +01:00
Camille GILLOT
fce0d37619 Add comment. 2020-03-26 09:40:52 +01:00
Camille GILLOT
5dfed41812 Simplify generics on try_start. 2020-03-26 09:40:51 +01:00
Camille GILLOT
fa06cfd25b Move generics on QueryCache. 2020-03-26 09:40:51 +01:00
Camille GILLOT
0e8b59a2f4 Prune dependencies. 2020-03-26 09:40:51 +01:00
Camille GILLOT
b6033fca02 Retire DepGraphSafe and HashStableContext. 2020-03-26 09:40:51 +01:00
Camille GILLOT
228ca8ef0a Access QueryStateShard directly. 2020-03-26 09:40:50 +01:00
Camille GILLOT
d305b2ccc6 Unify key types in get_lookup. 2020-03-26 09:40:50 +01:00
Camille GILLOT
301ad11e9b Rustfmt. 2020-03-26 09:40:50 +01:00
Camille GILLOT
dca03443a0 Make librustc compile. 2020-03-26 09:38:33 +01:00
Camille GILLOT
8e873c3c64 Make librustc_query_system compile. 2020-03-26 09:25:35 +01:00
Camille GILLOT
5b8dac3c39 Move query system to librustc_query_system. 2020-03-26 09:22:46 +01:00
Camille GILLOT
6184a71a39 Make get_query into an extension trait. 2020-03-26 09:22:46 +01:00