Commit graph

93167 commits

Author SHA1 Message Date
Mazdak Farrokhzad
f2dd97cc34
Rollup merge of #60741 - shiatsumat:patch-let-mut-write-graph-label, r=varkor
Remove redundant "let mut" in write_graph_label

Removed the redundant "let mut" in the write_graph_label function (it caused "let mut let mut" for non-user-defined local variables).
2019-05-11 23:41:41 +02:00
Mazdak Farrokhzad
5490cc1a41
Rollup merge of #60733 - Centril:cleanup-lowering-await, r=varkor
Cleanup the .await HIR lowering with .stmt(..).

r? @cramertj
2019-05-11 23:41:40 +02:00
Mazdak Farrokhzad
e19ad45107
Rollup merge of #60727 - chpio:master, r=sfackler
add comment to `Rc`/`Arc`'s `Eq` specialization

in addition to https://github.com/rust-lang/rust/pull/56550

https://github.com/rust-lang/rust/pull/42965#issuecomment-312702479
2019-05-11 23:41:38 +02:00
Mazdak Farrokhzad
5da009e23a
Rollup merge of #60720 - estebank:no-ice-thanks, r=zackmdavis
Remove unnecessary unwraps

Fix #60713.
2019-05-11 23:41:37 +02:00
Yusuke Matsushita
a145b14b3e
Remove redundant "let mut" in write_graph_label
Removed the redundant "let mut" in the write_graph_label function (it caused "let mut let mut" for non-user-defined local variables).
2019-05-12 01:47:20 +09:00
bors
3103fb2f72 Auto merge of #60739 - Manishearth:clippyup, r=Manishearth
Update clippy

r? @ghost
2019-05-11 16:26:12 +00:00
Manish Goregaokar
d17713599c Update clippy 2019-05-11 09:02:12 -07:00
Mazdak Farrokhzad
362431b4d6 Cleanup the .await HIR lowering with .stmt(..). 2019-05-11 15:42:14 +02:00
bors
5f1924c992 Auto merge of #60714 - varkor:existential-global-lift-ice, r=oli-obk
Fix ICE with un-feature-gated existential type

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

r? @oli-obk
2019-05-11 12:25:11 +00:00
bors
af39a1fd73 Auto merge of #60717 - varkor:impl-const-generic, r=matthewjasper
Fix a bug preventing const parameters from being used in const generic impls

Fixes https://github.com/rust-lang/rust/issues/60712.
2019-05-11 09:24:45 +00:00
Thomas Heck
740a8dabb4 add comment to Rc/Arc's Eq specialization 2019-05-11 11:03:28 +02:00
bors
b8e0d0a2aa Auto merge of #60700 - petrochenkov:preintern, r=nnethercote
syntax_pos: Optimize symbol interner pre-filling slightly

r? @nnethercote
2019-05-11 06:42:36 +00:00
bors
7519eaca9a Auto merge of #60721 - estebank:ice-ice-baby, r=varkor
Avoid ICE by using delay_span_bug

Fix #59406, fix #53498.
2019-05-11 03:56:11 +00:00
Esteban Küber
adc18eb7cf Avoid ICE by using delay_span_bug 2019-05-10 18:22:25 -07:00
Esteban Küber
c158a0f592 Remove unnecessary unwraps 2019-05-10 17:57:42 -07:00
varkor
b3207d531d Add test for const impl 2019-05-11 00:08:40 +01:00
varkor
0686daab4e Unwrap singleton block expressions in const arguments 2019-05-11 00:08:19 +01:00
bors
acc7e652f8 Auto merge of #59288 - Centril:hir-if-to-match, r=oli-obk
[let_chains, 1/6] Remove hir::ExprKind::If

Per https://github.com/rust-lang/rust/issues/53667#issuecomment-471583239.

r? @oli-obk
2019-05-10 22:58:52 +00:00
varkor
aa9369c7a4 Add test 2019-05-10 22:11:19 +01:00
varkor
26afc4fb91 Allow fallible lift_to_global in existential type writeback 2019-05-10 22:06:03 +01:00
bors
d595b11358 Auto merge of #60708 - Centril:rollup-j5smdo0, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #60529 (RFC 2008: Uninhabitedness fixes for enum variants and tests)
 - #60620 (Fix a couple of FIXMEs in ext::tt::transcribe)
 - #60659 (Tweak `Symbol` and `InternedString`)
 - #60692 (Extend #60676 test for nested mut patterns.)
 - #60697 (add regression test for #60629)
 - #60701 (Update mailmap for mati865)

Failed merges:

r? @ghost
2019-05-10 19:56:15 +00:00
Mazdak Farrokhzad
329275a06f
Rollup merge of #60701 - mati865:mailmap, r=Mark-Simulacrum
Update mailmap for mati865
2019-05-10 20:31:13 +02:00
Mazdak Farrokhzad
0b63f5530b
Rollup merge of #60697 - hellow554:fix_60629, r=michaelwoerister
add regression test for #60629

This bug was fixed, but I don't know which one. (I think it even doesn't matter at all).

Added a regression test.

```
op@OP ~/m/r/s/t/incremental> rustc --version
rustc 1.35.0-nightly (acd8dd6a5 2019-04-05)
op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass1 issue-60629.rs
warning: struct is never constructed: `A`
 --> issue-60629.rs:3:1
  |
3 | struct A;
  | ^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass2 issue-60629.rs
error: internal compiler error: src/librustc/ty/query/plumbing.rs:1195: Cannot force dep node: coherent_trait(core[c27c]::ops[0]::drop[0]::Drop[0])

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:635:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.35.0-nightly (acd8dd6a5 2019-04-05) running on x86_64-unknown-linux-gnu

note: compiler flags: -C incremental
```

with latest nightly it does not crash anymore, so nothing more to do.

Fixes #60629

(accidentally removed the remote branch on github, therefore GH closed the other PR.)

r? @nikomatsakis
2019-05-10 20:31:11 +02:00
Mazdak Farrokhzad
ec6afb1ff6
Rollup merge of #60692 - davidtwco:pr-60676-followup, r=Centril
Extend #60676 test for nested mut patterns.

At request of @centril, this commit extends the existing test added by #60676 to include nested `mut` patterns.

cc @Centril
2019-05-10 20:31:10 +02:00
Mazdak Farrokhzad
bc8c782f60
Rollup merge of #60659 - nnethercote:tweak-Symbol-and-InternedString, r=Zoxc
Tweak `Symbol` and `InternedString`

Some minor improvements to speed and code cleanliness.

r? @Zoxc
2019-05-10 20:31:09 +02:00
Mazdak Farrokhzad
20dff29b35
Rollup merge of #60620 - mark-i-m:transcribe-2, r=petrochenkov
Fix a couple of FIXMEs in ext::tt::transcribe

_Blocked on #60618_

A crater run would be nice to make sure my understanding is correct. A quick google search seems to indicate these are extremely rare errors if they are possible (which I don't believe they are).

r? @petrochenkov

cc #2887 (there is only one FIXME left and it is hygiene-related)
2019-05-10 20:31:07 +02:00
Mazdak Farrokhzad
d94cb9f2ea
Rollup merge of #60529 - davidtwco:rfc-2008-uninhabited, r=petrochenkov
RFC 2008: Uninhabitedness fixes for enum variants and tests

Part of #44109.

At the request of @Centril, this PR adds tests asserting that uninhabited non-exhaustive types are considered inhabited in extern crates. In adding these tests, I fixed an oversight in the implementation of RFC 2008 on enum variants that resulted in non-exhaustive enum variants being considered uninhabited in extern crates.

Before this PR, these lines would error:

```rust
// extern crate
pub enum UninhabitedVariants {
    #[non_exhaustive] Tuple(!),
    #[non_exhaustive] Struct { x: ! }
}

pub enum PartiallyInhabitedVariants {
    Tuple(u8),
    #[non_exhaustive] Struct { x: ! }
}

// current crate
match uninhabited_variant() /* fn() -> Option<UninhabitedVariants> */ {
    Some(_x) => (), //~ ERROR unreachable pattern
    None => (),
}

while let PartiallyInhabitedVariants::Struct { x, .. } = partially_inhabited_variant() /* fn() -> PartiallyInhabitedVariants */ {
    //~^ ERROR unreachable pattern
}
```

cc @Centril
r? @petrochenkov
2019-05-10 20:31:06 +02:00
Mazdak Farrokhzad
f9cc5a65d2 check_match: add FIXME for removing of hack. 2019-05-10 19:55:52 +02:00
Mazdak Farrokhzad
efd3733f9d add test checking that 'if cond { .. }' where 'cond: &mut? bool' isn't accepted. 2019-05-10 19:41:10 +02:00
Mazdak Farrokhzad
8d1e5b8b39 Various test changes 2019-05-10 19:41:10 +02:00
Mazdak Farrokhzad
99039689f0 Adjust mir-opt tests for new HIR without If 2019-05-10 19:41:10 +02:00
Mazdak Farrokhzad
5cccda1770 Remove hir::ExprKind::If and replace it with lowering to hir::ExprKind::Match. 2019-05-10 19:41:10 +02:00
David Wood
1f0fb0391c
Add a bunch more tests. 2019-05-10 17:52:13 +01:00
David Wood
214f977fee
Move uninhabited tests into subdirectory.
This commit just tries to tidy up a little.
2019-05-10 17:52:12 +01:00
David Wood
8838b9130e
Fix uninhabitedness of non-exhaustive enums.
This commit ensures that non-exhaustive enums are considered inhabited
when used in extern crates.
2019-05-10 17:52:12 +01:00
David Wood
0d034a2e4d
Fix inhabitedness of non-exhaustive variants.
This commit ensures that non-exhaustive variants are considered
inhabited when used in extern crates.
2019-05-10 17:52:12 +01:00
David Wood
0db087e684
Add uninhabitedness tests w/ #[non_exhaustive].
This commit adds tests checking that uninhabited non-exhaustive types
are considered inhabited when used in another crate.
2019-05-10 17:52:12 +01:00
bors
cff1bdbd77 Auto merge of #60588 - cuviper:be-simd-swap, r=alexcrichton
Revert "Disable big-endian simd in swap_nonoverlapping_bytes"

This reverts commit 77bd4dc654 (#43159).

Issue #42778 was formerly easy to reproduce on two big-endian targets,
`powerpc64` and `s390x`, so we disabled SIMD on this function for all
big-endian targets as a workaround.

I have re-tested this code on `powerpc64` and `s390x`, each with the
bundled LLVM 8 and with external LLVM 7 and LLVM 6, and the problems no
longer appear. So it seems safe to remove this workaround, although I'm
still a little uncomfortable that we never found a root-cause...

Closes #42778.
r? @arielb1
2019-05-10 15:29:40 +00:00
Mark Mansi
5b6bda3354 turn a couple of fixmes into span_bugs 2019-05-10 10:18:46 -05:00
Mateusz Mikuła
8fbe1ed6c7 Update mailmap for mati865 2019-05-10 16:47:25 +02:00
Vadim Petrochenkov
aeee1fb1f2 syntax_pos: Optimize symbol interner pre-filling slightly 2019-05-10 17:08:22 +03:00
Marcel Hellwig
c81780b156 add regression test for #60629 2019-05-10 12:59:40 +02:00
bors
0ac53da03d Auto merge of #60684 - jethrogb:jb/sgx-test, r=joshtriplett
Fix cfg(test) build on SGX

Introduced in #60657

r? @joshtriplett
2019-05-10 09:56:56 +00:00
David Wood
d28b7afd17
Extend existing test for nested mut patterns.
At request of `@centril`, this commit extends the existing test added
by #60676 to include nested `mut` patterns.
2019-05-10 08:55:54 +01:00
bors
c441b8aca5 Auto merge of #60585 - sunfishcode:wasm32-wasi, r=alexcrichton
Omit the vendor component in the WASI triple

This renames wasm32-unknown-wasi to wasm32-wasi, omitting the vendor
component. This follows aarch64-linux-android, x86_64-fuchsia, and others in
omitting the vendor field, which has the advantage of aligning with the
[multiarch tuple](https://wiki.debian.org/Multiarch/Tuples), and of being
less noisy.

r? @alexcrichton
2019-05-10 07:02:38 +00:00
Nicholas Nethercote
e53bb1aefb Reduce Symbol's interface slightly. 2019-05-10 15:59:13 +10:00
Nicholas Nethercote
cb7eacb1d2 Remove the From<InternedString> for String impl.
It's not used.
2019-05-10 15:59:13 +10:00
Nicholas Nethercote
0e27c36145 Add various comments.
Lots of details I wish I'd known when I first looked at this code.
2019-05-10 15:59:12 +10:00
Nicholas Nethercote
c2cae7bbc3 Avoid recursion in de-gensym functions. 2019-05-10 15:59:12 +10:00
Nicholas Nethercote
8c465b4efa Add InternedString::with2.
This lets comparisons occur with a single access to the interner,
instead of two.
2019-05-10 15:59:05 +10:00