rust/src/tools
bors c2a408840a Auto merge of #87688 - camsteffen:let-else, r=cjgillot
Introduce `let...else`

Tracking issue: #87335

The trickiest part for me was enforcing the diverging else block with clear diagnostics. Perhaps the obvious solution is to expand to `let _: ! = ..`, but I decided against this because, when a "mismatched type" error is found in typeck, there is no way to trace where in the HIR the expected type originated, AFAICT. In order to pass down this information, I believe we should introduce `Expectation::LetElseNever(HirId)` or maybe add `HirId` to `Expectation::HasType`, but I left that as a future enhancement. For now, I simply assert that the block is `!` with a custom `ObligationCauseCode`, and I think this is clear enough, at least to start. The downside here is that the error points at the entire block rather than the specific expression with the wrong type. I left a todo to this effect.

Overall, I believe this PR is feature-complete with regard to the RFC.
2021-09-01 01:02:42 +00:00
..
build-manifest Rollup merge of #87693 - badboy:enable-ios-sim-target-manifest, r=Mark-Simulacrum 2021-08-03 19:07:46 +09:00
cargo@f559c109cc Update cargo 2021-08-26 20:04:45 -07:00
cargotest rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
clippy Fix clippy for let-else 2021-08-30 20:18:41 -05:00
compiletest compiletest: allow . in remote test paths (can arise from revisions). 2021-08-26 20:20:08 +03:00
error_index_generator rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
expand-yaml-anchors rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
html-checker rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
jsondocck rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
linkchecker Fix typo -- "The" -> "They" 2021-08-06 18:40:36 -05:00
lint-docs rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
miri@09cadcbb62 update miri 2021-08-30 11:12:39 -04:00
remote-test-client rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
remote-test-server rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rls@a82a052705 Update RLS 2021-07-21 15:17:31 +02:00
rust-analyzer@996300f4a0 ⬆️ rust-analyzer 2021-08-23 09:01:38 +03:00
rust-demangler rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rust-installer@5254dbfd25 bump rust-installer submodule 2020-12-28 12:48:11 +01:00
rustbook Update mdbook. 2021-08-02 09:20:29 -07:00
rustc-workspace-hack rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustdoc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustdoc-gui Greatly improve limitation handling on parallel rustdoc GUI test run 2021-08-23 14:23:59 +02:00
rustdoc-js Fix rustdoc-js tool string "parsing" 2021-08-11 20:20:17 +02:00
rustdoc-themes rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustfmt Temporary fix rustfmt for let-else 2021-08-30 20:18:41 -05:00
tidy Fix typos “an”→“a” and a few different ones that appeared in the same search 2021-08-22 18:15:49 +02:00
tier-check rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
unicode-table-generator rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
unstable-book-gen rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
x rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
cherry-pick.sh Add cherry-pick.sh convenience script. 2021-08-20 11:58:18 +01:00
publish_toolstate.py Fix some Python2->3 error in publish_toolstate.py by type-checking it 2021-02-20 18:48:22 -05:00