Commit Graph

1021 Commits

Author SHA1 Message Date
Thomas Lively
62c3443e96 Re-enable Emscripten's exception handling support
Passes LLVM codegen and Emscripten link-time flags for exception
handling if and only if the panic strategy is `unwind`. Sets the
default panic strategy for Emscripten targets to `unwind`. Re-enables
tests that depend on unwinding support for Emscripten, including
`should_panic` tests.
2019-10-25 15:16:36 -07:00
Mazdak Farrokhzad
e25720f106
Rollup merge of #65390 - GuillaumeGomez:long-err-explanation-E0576, r=matthewjasper,kinnison
Add long error explanation for E0576

Part of #61137.
2019-10-25 06:18:02 +02:00
Esteban Küber
18d873e8f0 Avoid ICE when adjusting bad self ty 2019-10-24 00:41:14 -07:00
bors
4a8c5b20c7 Auto merge of #57545 - bovinebuddha:object_safe_for_dispatch, r=nikomatsakis
Object safe for dispatch

cc #43561
2019-10-23 13:34:27 +00:00
Guillaume Gomez
530d7098bf Update ui tests 2019-10-23 14:13:37 +02:00
Mathias Blikstad
ef5acdeceb RFC 2027: "first draft" of implementation
These are a squashed series of commits.
2019-10-22 15:24:33 -04:00
Mazdak Farrokhzad
ba42fc27fd
Rollup merge of #65602 - varkor:other-candidates, r=Centril
Fix plural mistake in emitter.rs
2019-10-20 12:40:22 +02:00
varkor
f042687959 Fix plural mistake in emitter.rs 2019-10-19 18:08:54 +01:00
Mazdak Farrokhzad
7e4ff91403
Rollup merge of #65192 - estebank:restrict-bound, r=matthewjasper
Use structured suggestion for restricting bounds

When a trait bound is not met and restricting a type parameter would
make the restriction hold, use a structured suggestion pointing at an
appropriate place (type param in param list or `where` clause).

Account for opaque parameters where instead of suggesting extending
the `where` clause, we suggest appending the new restriction:
`fn foo(impl Trait + UnmetTrait)`. Fix #64565, fix #41817, fix #24354,
cc #26026, cc #37808, cc #24159, fix #37138, fix #24354, cc #20671.
2019-10-19 16:00:51 +02:00
Mazdak Farrokhzad
53a3bfc82b
Rollup merge of #64007 - estebank:overlapping-patterns, r=matthewjasper
Add check for overlapping ranges to unreachable patterns lint

Fix #63987.
2019-10-19 16:00:50 +02:00
Wesley Wiser
a2e3ed5c05 [const-prop] Handle MIR Rvalue::Aggregates 2019-10-18 06:29:57 -04:00
bors
a16dca337d Auto merge of #65251 - tlively:emscripten-upstream-upgrade, r=tlively
Upgrade Emscripten targets to use upstream LLVM backend

 - Compatible with Emscripten 1.38.46-upstream or later upstream.
 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the old incorrect wasm32 C call ABI with the correct one,
   preserving the old one as wasm32_bindgen_compat for wasm-bindgen
   compatibility.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.

r? @alexcrichton
2019-10-17 06:47:18 +00:00
Thomas Lively
2bf59bea48 Upgrade Emscripten targets to use upstream LLVM backend
- Compatible with Emscripten 1.38.46-upstream or later upstream.
 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the old incorrect wasm32 C call ABI with the correct one,
   preserving the old one as wasm32_bindgen_compat for wasm-bindgen
   compatibility.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16 17:06:48 -07:00
Esteban Küber
593cdcccf2 Lint only on single element overlap 2019-10-16 12:22:23 -07:00
Esteban Küber
73d6efc43e Only emit overlapping patterns lint if the overlap is partial 2019-10-16 11:57:35 -07:00
Guillaume Gomez
7d357fbffd update ui tests 2019-10-16 13:56:14 +02:00
Tyler Mandry
ef5420301d
Rollup merge of #65438 - Centril:almost, r=varkor
Organize `never_type`  tests

Extracted from https://github.com/rust-lang/rust/pull/65355.
This just moves some tests around to make things better categorized.

r? @varkor
2019-10-15 16:07:58 -07:00
Tyler Mandry
42b35968fb
Rollup merge of #65308 - GuillaumeGomez:long-err-explanation-E0574, r=matthewjasper
Add long error explanation for E0574

Part of #61137.
2019-10-15 16:07:50 -07:00
Esteban Küber
9ed463a740 Do not suggest restriction on spans originating in macros 2019-10-15 13:55:44 -07:00
Esteban Küber
bc744bca90 Suggest associated bound restrictions in impls 2019-10-15 13:55:44 -07:00
Esteban Küber
5cc99eed04 Handle missing projection restriction 2019-10-15 13:55:44 -07:00
Esteban Küber
99ab45b91d Handle Self restriction needed 2019-10-15 13:55:43 -07:00
Esteban Küber
5b7ffd9333 Handle more cases 2019-10-15 13:55:43 -07:00
Mazdak Farrokhzad
1fb8cfb481 Organize never_type tests
Also move {run-fail -> ui}/never_type
2019-10-15 16:58:14 +02:00
Tyler Mandry
a14e35f382
Rollup merge of #65398 - estebank:capitalization-only, r=varkor
Bring attention to suggestions when the only difference is capitalization

CC #65386.
2019-10-14 17:52:41 -07:00
Mazdak Farrokhzad
a73e0731f4
Rollup merge of #65395 - JohnTitor:add-tests, r=Centril
Add some tests for fixed ICEs

Fixes #44153 (from 1.23.0)
Fixes #47486 (from 1.36.0)
Fixes #48010 (from 1.38.0)
Fixes #48027 (from nightly)
Fixes #48638 (from nightly)
2019-10-14 07:37:01 +02:00
Mazdak Farrokhzad
c2ae4ded4d
Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,Centril
Print lifetimes with backticks

Fixes #65287

r? @varkor
2019-10-14 07:36:54 +02:00
Esteban Küber
4bb771615e Bring attention to suggestions when the only difference is capitalization 2019-10-13 21:48:39 -07:00
Yuki Okushi
6323180b4a Add test for issue-47486 2019-10-14 10:45:56 +09:00
Guillaume Gomez
9f392c43dc Update ui tests 2019-10-13 22:10:03 +02:00
Mazdak Farrokhzad
963e4bc756
Rollup merge of #65248 - estebank:mention-if-let, r=cramertj
Suggest `if let` on `let` refutable binding

Fix #58385.
2019-10-13 13:34:32 +02:00
Tyler Mandry
811bd38ae1
Rollup merge of #65289 - varkor:issue-65284, r=estebank
Fix suggested bound addition diagnostic

Fixes #65284.
2019-10-11 15:09:58 -07:00
Tyler Mandry
728adc446c
Rollup merge of #65191 - varkor:const-generics-test-cases, r=nikomatsakis
Add some regression tests

- Add a test for #62187.
- Clean up the directory structure in `src/test/ui/const-generics`
- Closes #64792.
- Closes #57399.
- Closes #57271.
2019-10-11 15:09:45 -07:00
Yuki Okushi
2ae5e3421d Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
varkor
c97d71538a Fix issue 65284 2019-10-11 00:51:36 +01:00
Esteban Küber
4bb1592402 Suggest if let on let refutable binding 2019-10-09 12:25:48 -07:00
Mazdak Farrokhzad
58bfe3b0ec
Rollup merge of #65145 - estebank:turbofish-assoc-fn-call, r=varkor
When suggesting assoc function with type params, include turbofish

Fix https://github.com/rust-lang/rust/issues/61412, fix https://github.com/rust-lang/rust/issues/61411.
2019-10-08 15:45:29 +02:00
varkor
c99074490b Add a regression test for #57271 2019-10-07 22:24:04 +01:00
varkor
85b7aa2cfb Add a regression test for #57399 2019-10-07 22:10:50 +01:00
varkor
4eba21e4c7 Add regression test for #64792 2019-10-07 22:06:14 +01:00
varkor
2328a7ea40 Move stray issue tests into src/test/ui/issues 2019-10-07 22:05:56 +01:00
Guillaume Gomez
96efaad342 update ui tests 2019-10-07 17:12:54 +02:00
bors
0358617e3f Auto merge of #65043 - Aaron1011:fix/reexport-determinism, r=petrochenkov
Make re-export collection deterministic

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

Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See #65042 for a long-term strategy to detect this kind of issue
2019-10-06 08:40:43 +00:00
Tyler Mandry
69598dc3cf
Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry
Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend"

This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes.

This reverts commit 7870050796, reversing
changes made to 2e7244807a.
2019-10-05 21:55:13 -07:00
Tyler Mandry
2b225bab13
Rollup merge of #65011 - estebank:ice-o-matic, r=zackmdavis
Do not ICE when dereferencing non-Copy raw pointer

CC #52262. Confirmed to remove the unnecessary ICE, but without a repro case.
2019-10-05 21:54:54 -07:00
Tyler Mandry
008526340a
Rollup merge of #64708 - SimonSapin:option-deref, r=Centril
Stabilize `Option::as_deref` and `Option::as_deref_mut`

The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-10-05 21:54:47 -07:00
Tyler Mandry
d16b7f705b Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton"
This reverts commit 7870050796, reversing
changes made to 2e7244807a.
2019-10-05 21:38:45 -07:00
Esteban Küber
3166ce81ec Account for derefs when suggesting assoc function 2019-10-05 16:57:14 -07:00
Aaron Hill
add0a42034
Remove for_each_child_stable
Now that `Resolutions` has a deterministic iteration order, it's no
longer necessary to sort its entries before iterating over them
2019-10-05 16:34:38 -04:00
bors
7870050796 Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton
Upgrade Emscripten targets to use upstream LLVM backend

 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the incorrect wasm32 C call ABI with the old asmjs
   version, which is correct for both wasm32 and JS.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Temporarily makes Emscripten targets use panic=abort by default
   because supporting unwinding will require an LLVM patch.
2019-10-04 20:33:02 +00:00