]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agofeat(rustdoc): open sidebar menu when links inside it are focused
Michael Howell [Fri, 16 Jul 2021 15:04:49 +0000 (08:04 -0700)]
feat(rustdoc): open sidebar menu when links inside it are focused

Fixes #87172

Based on #87167 (which should be merged first)

Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html

Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
2 years agoAdd test for sidebar display value on mobile
Guillaume Gomez [Thu, 15 Jul 2021 20:12:28 +0000 (22:12 +0200)]
Add test for sidebar display value on mobile

2 years agoDo not hide the sidebar on mobile, move it outside of the viewport instead
Guillaume Gomez [Thu, 15 Jul 2021 20:06:53 +0000 (22:06 +0200)]
Do not hide the sidebar on mobile, move it outside of the viewport instead

2 years agoAuto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov
bors [Thu, 15 Jul 2021 02:39:38 +0000 (02:39 +0000)]
Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov

Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

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

r? `@petrochenkov` cc `@alexcrichton`

2 years agoReuse CrateNum for proc-macro crates even when cross-compiling
Joshua Nelson [Sun, 4 Jul 2021 03:35:24 +0000 (23:35 -0400)]
Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

2 years agoAuto merge of #87137 - richkadel:compiler-builtins-0.1.47, r=tmandry
bors [Wed, 14 Jul 2021 23:58:43 +0000 (23:58 +0000)]
Auto merge of #87137 - richkadel:compiler-builtins-0.1.47, r=tmandry

Update compiler-builtins to 0.1.47

  Bumped to `0.1.47` to resolve missing symbols on `aarch` when linking
  `cargo`. This was due to a recent change in a `cargo` dependency on
  `curl` (upstream C library added code that uses the uncommon `long
  double` type).

r? `@tmandry`

2 years agoAuto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett
bors [Wed, 14 Jul 2021 21:17:52 +0000 (21:17 +0000)]
Auto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett

Make the specialized Fuse still deal with None

Fixes #85863 by removing the assumption that we'll never see a cleared iterator in the `I: FusedIterator` specialization. Now all `Fuse` methods check for the possibility that `self.iter` is `None`, and the specialization only avoids _setting_ that to `None` in `&mut self` methods.

2 years agoUpdate compiler-builtins to 0.1.47
Rich Kadel [Wed, 14 Jul 2021 20:45:16 +0000 (13:45 -0700)]
Update compiler-builtins to 0.1.47

  Bumped to `0.1.47` to resolve missing symbols on `aarch` when linking
  `cargo`. This was due to a recent change in a `cargo` dependency on
  `curl` (upstream C library added code that uses the uncommon `long
  double` type).

2 years agoAuto merge of #87133 - GuillaumeGomez:rollup-pfz9jbk, r=GuillaumeGomez
bors [Wed, 14 Jul 2021 18:36:44 +0000 (18:36 +0000)]
Auto merge of #87133 - GuillaumeGomez:rollup-pfz9jbk, r=GuillaumeGomez

Rollup of 6 pull requests

Successful merges:

 - #87027 (expand: Support helper attributes for built-in derive macros)
 - #87056 (Fix codeblocks overflow)
 - #87117 (Shrink the CrateStore dynamic interface.)
 - #87120 (rustdoc: Remove unnecessary `extern crate` aliases)
 - #87125 (Fix Ayu theme `<code>` color)
 - #87130 (Update browser-ui-test package version)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #87130 - GuillaumeGomez:update-browser-ui-test, r=Mark-Simulacrum
Guillaume Gomez [Wed, 14 Jul 2021 17:53:41 +0000 (19:53 +0200)]
Rollup merge of #87130 - GuillaumeGomez:update-browser-ui-test, r=Mark-Simulacrum

Update browser-ui-test package version

It adds a check to prevent to have empty CSS values in `assert-css` command.

r? `@Mark-Simulacrum`

2 years agoRollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddle
Guillaume Gomez [Wed, 14 Jul 2021 17:53:40 +0000 (19:53 +0200)]
Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddle

Fix Ayu theme <code> color

Fixes #87072 (the second regression).

r? `@notriddle`

2 years agoRollup merge of #87120 - jyn514:rustdoc-cleanup, r=CraftSpider
Guillaume Gomez [Wed, 14 Jul 2021 17:53:38 +0000 (19:53 +0200)]
Rollup merge of #87120 - jyn514:rustdoc-cleanup, r=CraftSpider

rustdoc: Remove unnecessary `extern crate` aliases

2 years agoRollup merge of #87117 - cjgillot:cstore, r=petrochenkov
Guillaume Gomez [Wed, 14 Jul 2021 17:53:37 +0000 (19:53 +0200)]
Rollup merge of #87117 - cjgillot:cstore, r=petrochenkov

Shrink the CrateStore dynamic interface.

The information is either accessible through queries or by crates which already depend on rustc_metadata.

2 years agoRollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddle
Guillaume Gomez [Wed, 14 Jul 2021 17:53:36 +0000 (19:53 +0200)]
Rollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddle

Fix codeblocks overflow

Fixes #87043.

Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.

r? `@Nemo157`

2 years agoRollup merge of #87027 - petrochenkov:builderhelp, r=oli-obk
Guillaume Gomez [Wed, 14 Jul 2021 17:53:35 +0000 (19:53 +0200)]
Rollup merge of #87027 - petrochenkov:builderhelp, r=oli-obk

expand: Support helper attributes for built-in derive macros

This is needed for https://github.com/rust-lang/rust/pull/86735 (derive macro `Default` should have a helper attribute `default`).

With this PR we can specify helper attributes for built-in derives using syntax `#[rustc_builtin_macro(MacroName, attributes(attr1, attr2, ...))]` which mirrors equivalent syntax for proc macros `#[proc_macro_derive(MacroName, attributes(attr1, attr2, ...))]`.
Otherwise expansion infra was already ready for this.
The attribute parsing code is shared between proc macro derives and built-in macros (`fn parse_macro_name_and_helper_attrs`).

2 years agoAuto merge of #87082 - michaelwoerister:const-in-debuginfo-type-names-fix, r=oli...
bors [Wed, 14 Jul 2021 15:18:27 +0000 (15:18 +0000)]
Auto merge of #87082 - michaelwoerister:const-in-debuginfo-type-names-fix, r=oli-obk,wesleywiser

Handle non-integer const generic parameters in debuginfo type names.

This PR fixes an ICE introduced by https://github.com/rust-lang/rust/pull/85269 which started emitting const generic arguments for debuginfo names but did not cover the case where such an argument could not be evaluated to a flat string of bits.

The fix implemented in this PR is very basic: If `try_eval_bits()` fails for the constant in question, we fall back to generating a stable hash of the constant and emit that instead. This way we get a (virtually) unique name and side step the problem of generating a string representation of a potentially complex value.

The downside is that the generated name will be rather opaque. E.g. the regression test adds a function `const_generic_fn_non_int<()>` which is then rendered as `const_generic_fn_non_int<{CONST#fe3cfa0214ac55c7}>`. I think it's an open question how to deal with this more gracefully.

I'd be interested in ideas on how to do this better.

r? `@wesleywiser`

cc `@dpaoliello` (do you see any problems with this approach?)
cc `@Mark-Simulacrum` & `@nagisa` (who I've seen comment on debuginfo issues recently -- anyone else?)

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

2 years agoShrink the CrateStore dynamic interface.
Camille GILLOT [Mon, 12 Jul 2021 19:20:16 +0000 (21:20 +0200)]
Shrink the CrateStore dynamic interface.

2 years agoUpdate browser-ui-test package version
Guillaume Gomez [Wed, 14 Jul 2021 14:28:15 +0000 (16:28 +0200)]
Update browser-ui-test package version

2 years agoHandle non-integer const generic parameters in debuginfo type names.
Michael Woerister [Mon, 12 Jul 2021 13:12:49 +0000 (15:12 +0200)]
Handle non-integer const generic parameters in debuginfo type names.

2 years agoAdd GUI test to check ayu <code> colors
Guillaume Gomez [Wed, 14 Jul 2021 13:00:12 +0000 (15:00 +0200)]
Add GUI test to check ayu <code> colors

2 years agoAuto merge of #87118 - JohnTitor:rollup-8ltidsq, r=JohnTitor
bors [Wed, 14 Jul 2021 12:49:45 +0000 (12:49 +0000)]
Auto merge of #87118 - JohnTitor:rollup-8ltidsq, r=JohnTitor

Rollup of 6 pull requests

Successful merges:

 - #87085 (Search result colors)
 - #87090 (Make BTreeSet::split_off name elements like other set methods do)
 - #87098 (Unignore some pretty printing tests)
 - #87099 (Upgrade `cc` crate to 1.0.69)
 - #87101 (Suggest a path separator if a stray colon is found in a match arm)
 - #87102 (Add GUI test for "go to first" feature)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoFix color for <code> which are not in doc blocks
Guillaume Gomez [Wed, 14 Jul 2021 12:47:54 +0000 (14:47 +0200)]
Fix color for <code> which are not in doc blocks

2 years agoAdd test for codeblocks overflow
Guillaume Gomez [Sun, 11 Jul 2021 11:06:48 +0000 (13:06 +0200)]
Add test for codeblocks overflow

2 years agoFix display for non-rust code blocks
Guillaume Gomez [Sun, 11 Jul 2021 10:40:31 +0000 (12:40 +0200)]
Fix display for non-rust code blocks

2 years agoAuto merge of #86211 - tlyu:option-result-overviews, r=joshtriplett
bors [Wed, 14 Jul 2021 05:10:57 +0000 (05:10 +0000)]
Auto merge of #86211 - tlyu:option-result-overviews, r=joshtriplett

create method overview docs for core::option and core::result

The `Option` and `Result` types have large lists of methods. They each could use an overview page of methods grouped by category. These proposed overviews include "truth tables" for the underappreciated boolean operators/combinators of these types. The methods are already somewhat categorized in the source, but some logical groupings are broken up by the necessities of putting related methods in different `impl` blocks, for example.

This is based on #86209, but those are small changes and unlikely to conflict.

2 years agoRemove useless alias from `rustc_span` to itself
Joshua Nelson [Wed, 14 Jul 2021 01:41:05 +0000 (21:41 -0400)]
Remove useless alias from `rustc_span` to itself

2 years agoRemove renaming of `test` crate
Joshua Nelson [Wed, 14 Jul 2021 01:40:09 +0000 (21:40 -0400)]
Remove renaming of `test` crate

This is leftover from when `doctest` used to be called `test`. Remove it
now, it's unnecessary and makes the code harder to read.

2 years agoAuto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov
bors [Wed, 14 Jul 2021 01:41:12 +0000 (01:41 +0000)]
Auto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov

Avoid cloning ExpnData to access Span edition

ExpnData is a fairly hefty structure to clone; cloning it may not be cheap. In
some cases this may get optimized out, but it's not clear that will always be
the case. Try to avoid that cost.

r? `@ghost` -- opening for a perf run to start with

2 years agoRollup merge of #87102 - GuillaumeGomez:go-to-first-feature, r=Manisheart,notriddle
Yuki Okushi [Wed, 14 Jul 2021 00:35:27 +0000 (09:35 +0900)]
Rollup merge of #87102 - GuillaumeGomez:go-to-first-feature, r=Manisheart,notriddle

Add GUI test for "go to first" feature

It adds a test for #85876 to ensure the feature is working as expected and prevent potential regression.

cc ```@jeanlucthumm```

r? ```@Manishearth```

2 years agoRollup merge of #87101 - FabianWolff:issue-87086, r=estebank
Yuki Okushi [Wed, 14 Jul 2021 00:35:26 +0000 (09:35 +0900)]
Rollup merge of #87101 - FabianWolff:issue-87086, r=estebank

Suggest a path separator if a stray colon is found in a match arm

Attempts to fix #87086.

r? `@estebank`

2 years agoRollup merge of #87099 - JohnTitor:upgrade-cc-crate, r=alexcrichton
Yuki Okushi [Wed, 14 Jul 2021 00:35:25 +0000 (09:35 +0900)]
Rollup merge of #87099 - JohnTitor:upgrade-cc-crate, r=alexcrichton

Upgrade `cc` crate to 1.0.69

This pulls another fix for #83043, i.e., alexcrichton/cc-rs#605.
r? ``@alexcrichton``

2 years agoRollup merge of #87098 - JohnTitor:unignore-some-tests, r=petrochenkov
Yuki Okushi [Wed, 14 Jul 2021 00:35:23 +0000 (09:35 +0900)]
Rollup merge of #87098 - JohnTitor:unignore-some-tests, r=petrochenkov

Unignore some pretty printing tests

Closes #37201
r? ````@petrochenkov````

2 years agoRollup merge of #87090 - ssomers:btree_comments, r=the8472
Yuki Okushi [Wed, 14 Jul 2021 00:35:22 +0000 (09:35 +0900)]
Rollup merge of #87090 - ssomers:btree_comments, r=the8472

Make BTreeSet::split_off name elements like other set methods do

r? ````@Mark-Simulacrum````

2 years agoRollup merge of #87085 - GuillaumeGomez:search-result-colors, r=notriddle
Yuki Okushi [Wed, 14 Jul 2021 00:35:22 +0000 (09:35 +0900)]
Rollup merge of #87085 - GuillaumeGomez:search-result-colors, r=notriddle

Search result colors

Part of  #87072 (fixes the first and fourth regressions and add tests to prevent it from happening again).

cc ````@Nemo157````

r? ````@camelid````

2 years agoSuggest a path separator if a stray colon is found in a match arm
Fabian Wolff [Tue, 13 Jul 2021 11:18:03 +0000 (13:18 +0200)]
Suggest a path separator if a stray colon is found in a match arm

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2 years agoAuto merge of #87044 - cjgillot:expnhash, r=petrochenkov
bors [Tue, 13 Jul 2021 22:32:58 +0000 (22:32 +0000)]
Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov

Cache expansion hash globally

... instead of computing it multiple times.

Split from #86676
r? `@petrochenkov`

2 years agoCache expansion hash.
Camille GILLOT [Tue, 22 Jun 2021 17:20:25 +0000 (19:20 +0200)]
Cache expansion hash.

2 years agoMove HashStable implementations.
Camille GILLOT [Tue, 22 Jun 2021 17:16:18 +0000 (19:16 +0200)]
Move HashStable implementations.

2 years agoexpand: Support helper attributes for built-in derive macros
Vadim Petrochenkov [Sat, 10 Jul 2021 14:16:53 +0000 (17:16 +0300)]
expand: Support helper attributes for built-in derive macros

2 years agoAdd test for "go to first" feature
Guillaume Gomez [Tue, 13 Jul 2021 12:41:19 +0000 (14:41 +0200)]
Add test for "go to first" feature

2 years agoAuto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk
bors [Tue, 13 Jul 2021 15:06:10 +0000 (15:06 +0000)]
Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk

Fix internal `default_hash_types` lint to use resolved path

I run into false positives now and then (mostly in Clippy) when I want to name some util after HashMap.

2 years agoAvoid cloning ExpnData to access Span edition
Mark Rousskov [Tue, 13 Jul 2021 14:57:10 +0000 (10:57 -0400)]
Avoid cloning ExpnData to access Span edition

ExpnData is a fairly hefty structure to clone; cloning it may not be cheap. In
some cases this may get optimized out, but it's not clear that will always be
the case. Try to avoid that cost.

2 years agoAuto merge of #86922 - joshtriplett:target-abi, r=oli-obk
bors [Tue, 13 Jul 2021 12:25:10 +0000 (12:25 +0000)]
Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk

target abi

Implement cfg(target_abi) (RFC 2992)

Add an `abi` field to `TargetOptions`, defaulting to "". Support using
`cfg(target_abi = "...")` for conditional compilation on that field.

Gated by `feature(cfg_target_abi)`.

Add a test for `target_abi`, and a test for the feature gate.

Add `target_abi` to tidy as a platform-specific cfg.

Update targets to use `target_abi`

All eabi targets have `target_abi = "eabi".`
All eabihf targets have `target_abi = "eabihf"`.
`armv6_unknown_freebsd` and `armv7_unknown_freebsd` have `target_abi = "eabihf"`.
All abi64 targets have `target_abi = "abi64"`.
All ilp32 targets have `target_abi = "ilp32"`.
All softfloat targets have `target_abi = "softfloat"`.
All *-uwp-windows-* targets have `target_abi = "uwp"`.
All spe targets have `target_abi = "spe"`.
All macabi targets have `target_abi = "macabi"`.
aarch64-apple-ios-sim has `target_abi = "sim"`.
`x86_64-fortanix-unknown-sgx` has `target_abi = "fortanix"`.
`x86_64-unknown-linux-gnux32` has `target_abi = "x32"`.

Add FIXME entries for targets for which existing values need to change
once `cfg_target_abi` becomes stable. (All of them are tier 3 targets.)

Add a test for `target_abi` in `--print cfg`.

2 years agoAuto merge of #87019 - nikic:clang-12.0.1, r=Mark-Simulacrum
bors [Tue, 13 Jul 2021 09:40:28 +0000 (09:40 +0000)]
Auto merge of #87019 - nikic:clang-12.0.1, r=Mark-Simulacrum

Use clang 12.0.1 on dist-x86_64/i686-linux

The LLD + ThinLTO __morestack bug has been fixed in 12.0.1, so
we can now update our clang version. This also means that we no
longer need to build Python 2.

2 years agoUpgrade `cc` crate to 1.0.69
Yuki Okushi [Tue, 13 Jul 2021 08:58:50 +0000 (17:58 +0900)]
Upgrade `cc` crate to 1.0.69

2 years agoAdd test for keyword/primitive text color
Guillaume Gomez [Mon, 12 Jul 2021 15:42:59 +0000 (17:42 +0200)]
Add test for keyword/primitive text color

2 years agoFix color for keyword/primitive search result
Guillaume Gomez [Mon, 12 Jul 2021 15:42:53 +0000 (17:42 +0200)]
Fix color for keyword/primitive search result

2 years agoAdd test for search results colors
Guillaume Gomez [Mon, 12 Jul 2021 14:48:25 +0000 (16:48 +0200)]
Add test for search results colors

2 years agoFix search result description text color for ayu theme
Guillaume Gomez [Mon, 12 Jul 2021 14:32:26 +0000 (16:32 +0200)]
Fix search result description text color for ayu theme

2 years agoUnignore some pretty printing tests
Yuki Okushi [Tue, 13 Jul 2021 07:55:40 +0000 (16:55 +0900)]
Unignore some pretty printing tests

3 years agoAuto merge of #86857 - fee1-dead:add-attr, r=oli-obk
bors [Tue, 13 Jul 2021 06:59:34 +0000 (06:59 +0000)]
Auto merge of #86857 - fee1-dead:add-attr, r=oli-obk

Add #[default_method_body_is_const]

`@rustbot` label F-const_trait_impl

3 years agoAuto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk
bors [Tue, 13 Jul 2021 04:38:39 +0000 (04:38 +0000)]
Auto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk

Implement Mutation- and BorrowOfLayoutConstrainedField in thir-unsafeck

Since nobody has so far claimed Mutation- and BorrowOfLayoutConstrainedField in rust-lang/project-thir-unsafeck#7, I have taken the liberty of implementing them in thir-unsafeck.

r? `@LeSeulArtichaut`

3 years agoAuto merge of #87095 - JohnTitor:rollup-mn7ggy2, r=JohnTitor
bors [Tue, 13 Jul 2021 01:52:49 +0000 (01:52 +0000)]
Auto merge of #87095 - JohnTitor:rollup-mn7ggy2, r=JohnTitor

Rollup of 11 pull requests

Successful merges:

 - #86344 (Split MaybeUninit::write into new feature gate and stabilize it)
 - #86811 (Remove unstable `io::Cursor::remaining`)
 - #86846 (stdio_locked: add tracking issue)
 - #86887 (rustdoc: remove dead code in `clean`)
 - #87007 (Fix rust-analyzer install when not available.)
 - #87035 (Fix implementors display)
 - #87065 (Fix ICE with unsized type in const pattern)
 - #87070 (Simplify future incompatible reporting.)
 - #87077 (:arrow_up: rust-analyzer)
 - #87078 (Rustdoc: suggest removing disambiguator if linking to field)
 - #87089 (CTFE engine: small cleanups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #87089 - RalfJung:ctfe-memory-cleanup, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:39 +0000 (08:54 +0900)]
Rollup merge of #87089 - RalfJung:ctfe-memory-cleanup, r=oli-obk

CTFE engine: small cleanups

I noticed these while preparing a large PR, and figured I'd better send them ahead to not muddy the diff unnecessarily.

- remove remaining use of Pointer in Allocation API (I missed those in https://github.com/rust-lang/rust/pull/85472)
- remove unnecessary deallocate_local hack (this logic does not seem necessary any more)

r? `@oli-obk`

3 years agoRollup merge of #87078 - fee1-dead:rustdoc, r=jyn514
Yuki Okushi [Mon, 12 Jul 2021 23:54:38 +0000 (08:54 +0900)]
Rollup merge of #87078 - fee1-dead:rustdoc, r=jyn514

Rustdoc: suggest removing disambiguator if linking to field

This fixes #85615.

`@rustbot` label T-rustdoc

3 years agoRollup merge of #87077 - lnicola:rust-analyzer-2021-07-12, r=lnicola
Yuki Okushi [Mon, 12 Jul 2021 23:54:37 +0000 (08:54 +0900)]
Rollup merge of #87077 - lnicola:rust-analyzer-2021-07-12, r=lnicola

:arrow_up: rust-analyzer

`@bors` r+

3 years agoRollup merge of #87070 - ehuss:simplify-future-report, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:36 +0000 (08:54 +0900)]
Rollup merge of #87070 - ehuss:simplify-future-report, r=oli-obk

Simplify future incompatible reporting.

This simplifies the implementation of the future incompatible reporting system. Instead of having a separate field in the future_incompatible definition, this reuses the `FutureIncompatibilityReason` enum. It also drops the "date" field. Cargo does not use the date field, and there isn't much of a need for this to be structured, and I am skeptical that the date can be predicted reliably. The date or release version can be listed in the lint text if desired.

3 years agoRollup merge of #87065 - FabianWolff:issue-87046, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:34 +0000 (08:54 +0900)]
Rollup merge of #87065 - FabianWolff:issue-87046, r=oli-obk

Fix ICE with unsized type in const pattern

Fixes #87046. The `deref_const()` query currently contains the following check:
https://github.com/rust-lang/rust/blob/e9a387d6cf5961a7f2dcb671da3147bd413355c4/compiler/rustc_mir/src/const_eval/mod.rs#L191-L204

i.e. this will cause an ICE for every unsized type except slices. An error is reported with my changes if such a type is used as a const pattern (this should not be a breaking change, since so far, this has caused an ICE).

3 years agoRollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddle
Yuki Okushi [Mon, 12 Jul 2021 23:54:33 +0000 (08:54 +0900)]
Rollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddle

Fix implementors display

Part of https://github.com/rust-lang/rust/issues/86632.

This PR does a few things:
 * It fixes of the JS rendered implementors.
 * It generates anchors for JS rendered implementors to make it coherent with the others.
 * It adds a test to ensure that we won't have the same issue again.
 * It changes the way we render the rustdoc-gui crates to simplify it a bit and also to allow to have dependencies without going through compiletest.

Before:

![Screenshot from 2021-07-10 13-30-13](https://user-images.githubusercontent.com/3050060/125174172-b4048700-e1c3-11eb-8f0e-c46081371d4f.png)

After:

![Screenshot from 2021-07-10 21-11-15](https://user-images.githubusercontent.com/3050060/125174173-b49d1d80-e1c3-11eb-8740-1dbbff70c2eb.png)

I plan to add the `[src]` links in another PR because this one is already big enough.

cc `@Mark-Simulacrum` (for the bootstrap changes)

r? `@Nemo157`

3 years agoRollup merge of #87007 - ehuss:fix-rust-analyzer-install, r=Mark-Simulacrum
Yuki Okushi [Mon, 12 Jul 2021 23:54:32 +0000 (08:54 +0900)]
Rollup merge of #87007 - ehuss:fix-rust-analyzer-install, r=Mark-Simulacrum

Fix rust-analyzer install when not available.

This changes it so that `x.py install` won't fail if rust-analyzer isn't available. This was changed in #86568 to handle the case where installing on stable/beta, and `extended=true`, to skip rust-analyzer. But I neglected to update the install part to also ignore it.

Fixes #86999

3 years agoRollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider
Yuki Okushi [Mon, 12 Jul 2021 23:54:31 +0000 (08:54 +0900)]
Rollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider

rustdoc: remove dead code in `clean`

Builds on https://github.com/rust-lang/rust/pull/86886 and should not be merged before.

3 years agoRollup merge of #86846 - tlyu:stdio-locked-tracking, r=joshtriplett
Yuki Okushi [Mon, 12 Jul 2021 23:54:30 +0000 (08:54 +0900)]
Rollup merge of #86846 - tlyu:stdio-locked-tracking, r=joshtriplett

stdio_locked: add tracking issue

Add the tracking issue number #86845 to the stability attributes for the implementation in #86799.

r? `@joshtriplett`
`@rustbot` label +A-io +C-cleanup +T-libs-api

3 years agoRollup merge of #86811 - soerenmeier:remove_remaining, r=yaahc
Yuki Okushi [Mon, 12 Jul 2021 23:54:28 +0000 (08:54 +0900)]
Rollup merge of #86811 - soerenmeier:remove_remaining, r=yaahc

Remove unstable `io::Cursor::remaining`

Adding `io::Cursor::remaining` in #86037 caused a conflict with the implementation of `bytes::Buf` for `io::Cursor`, leading to an error in nightly, see https://github.com/rust-lang/rust/issues/86369#issuecomment-867723485.

This fixes the error by temporarily removing the `remaining` function.

r? `@yaahc`

3 years agoRollup merge of #86344 - est31:maybe-uninit-extra, r=RalfJung
Yuki Okushi [Mon, 12 Jul 2021 23:54:27 +0000 (08:54 +0900)]
Rollup merge of #86344 - est31:maybe-uninit-extra, r=RalfJung

Split MaybeUninit::write into new feature gate and stabilize it

This splits off the `MaybeUninit::write` function from the `maybe_uninit_extra` feature gate into a new `maybe_uninit_write` feature gate and stabilizes it.

Earlier work to improve the documentation of the write function: #86220

Tracking issue: #63567

3 years agoAuto merge of #87018 - nikic:llvm-12.0.1, r=Mark-Simulacrum
bors [Mon, 12 Jul 2021 23:24:25 +0000 (23:24 +0000)]
Auto merge of #87018 - nikic:llvm-12.0.1, r=Mark-Simulacrum

Update to LLVM 12.0.1

LLVM 12.0.1 has been released, rebase our fork on top of it.

3 years agoMake BTreeSet::split_off name elements like other set methods do
Stein Somers [Wed, 18 Nov 2020 17:19:38 +0000 (18:19 +0100)]
Make BTreeSet::split_off name elements like other set methods do

3 years agoAuto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebank
bors [Mon, 12 Jul 2021 20:43:28 +0000 (20:43 +0000)]
Auto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebank

shrinking the deprecated span

ref: https://github.com/rust-lang/rust/pull/85617#issuecomment-854947988

part of #85403

r? `@estebank`

The reason is that if we use method_span directly, it will cause the in_derive_expansion judgment to fail.

3 years agoProvide a better error when `x.py install src/doc` doesn't work.
Eric Huss [Mon, 12 Jul 2021 20:29:47 +0000 (13:29 -0700)]
Provide a better error when `x.py install src/doc` doesn't work.

3 years agoUse the write function in some more places
est31 [Mon, 12 Jul 2021 18:32:23 +0000 (20:32 +0200)]
Use the write function in some more places

3 years agoremove unnecessary deallocate_local hack
Ralf Jung [Mon, 12 Jul 2021 16:45:56 +0000 (18:45 +0200)]
remove unnecessary deallocate_local hack

3 years agoAdd test for implementors
Guillaume Gomez [Sat, 10 Jul 2021 19:10:14 +0000 (21:10 +0200)]
Add test for implementors

3 years agoSimplify build system for rustdoc-gui test crates
Guillaume Gomez [Sat, 10 Jul 2021 19:09:51 +0000 (21:09 +0200)]
Simplify build system for rustdoc-gui test crates

3 years agoAuto merge of #87087 - fee1-dead:fix-try-2, r=joshtriplett
bors [Mon, 12 Jul 2021 16:55:44 +0000 (16:55 +0000)]
Auto merge of #87087 - fee1-dead:fix-try-2, r=joshtriplett

Remove `multiple-definitions` test

r? `@joshtriplett`

Temporary solution to #87084.

3 years agoremove remaining use of Pointer in Allocation API
Ralf Jung [Mon, 12 Jul 2021 16:45:26 +0000 (18:45 +0200)]
remove remaining use of Pointer in Allocation API

3 years agoRemove `multiple-definitions` test
Deadbeef [Mon, 12 Jul 2021 16:14:28 +0000 (00:14 +0800)]
Remove `multiple-definitions` test

3 years agoAuto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremee
bors [Mon, 12 Jul 2021 11:52:55 +0000 (11:52 +0000)]
Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremee

Fix rendering of reexported macros 2.0 and fix visibility of reexported items

So, this PR grew a bit out of focus, it does the following things:

* Fixes #86276.
* Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself).
* Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped.
* Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items.

I added tests to check everything listed above.

cc `@camelid` `@ollie27` (in case one of you want to review?)

r? `@jyn514`

3 years agosuggest removing disambiguator if linking to field
Deadbeef [Mon, 12 Jul 2021 11:04:51 +0000 (19:04 +0800)]
suggest removing disambiguator if linking to field

3 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 12 Jul 2021 06:54:59 +0000 (09:54 +0300)]
:arrow_up: rust-analyzer

3 years agoUpdate to LLVM 12.0.1
Nikita Popov [Sat, 10 Jul 2021 08:20:19 +0000 (10:20 +0200)]
Update to LLVM 12.0.1

3 years agoAuto merge of #86815 - FabianWolff:issue-84210, r=varkor
bors [Mon, 12 Jul 2021 01:00:43 +0000 (01:00 +0000)]
Auto merge of #86815 - FabianWolff:issue-84210, r=varkor

Improve error reporting for modifications behind `&` references

I had a look at #84210 and noticed that #85823 has effectively already fixed #84210.

However, the string matching in #85823 is _very_ crude and already breaks down when a variable name starts with `mut`. I have made this a bit more robust; further improvements could definitely be made but are complicated by the lack of information provided by an earlier pass:
https://github.com/rust-lang/rust/blob/ce331ee6ee010438d1a58c7da8ced4f26d69a20e/compiler/rustc_mir_build/src/build/matches/mod.rs#L2103-L2107

I have also fixed a missing comma in the error message.

3 years agoAuto merge of #86249 - FabianWolff:issue-86238, r=varkor
bors [Sun, 11 Jul 2021 22:39:16 +0000 (22:39 +0000)]
Auto merge of #86249 - FabianWolff:issue-86238, r=varkor

Report an error if resolution of closure call functions failed

This pull request fixes #86238. The current implementation seems to assume that resolution of closure call functions (I'm not sure what the proper term is; I mean `call` of `Fn` etc.) can never fail:
https://github.com/rust-lang/rust/blob/60f1a2fc4b535ead9c85ce085fdce49b1b097531/compiler/rustc_typeck/src/check/callee.rs#L590-L595

But actually, it can, if the `fn`/`fn_mut`/`fn_once` lang items are not defined, or don't have an associated `call`/`call_mut`/`call_once` function, leading to the ICE described in #86238. I have therefore turned the `span_bug!()` into an error message, which prevents the ICE.

3 years agoSimplify future incompatible reporting.
Eric Huss [Sun, 11 Jul 2021 20:08:58 +0000 (13:08 -0700)]
Simplify future incompatible reporting.

3 years agoAuto merge of #87068 - JohnTitor:rollup-2xuisfx, r=JohnTitor
bors [Sun, 11 Jul 2021 19:34:04 +0000 (19:34 +0000)]
Auto merge of #87068 - JohnTitor:rollup-2xuisfx, r=JohnTitor

Rollup of 8 pull requests

Successful merges:

 - #73936 (Rustdoc: Change all 'optflag' arguments to 'optflagmulti')
 - #86926 (Update regex crates)
 - #86951 ([docs] Clarify behaviour of f64 and f32::sqrt when argument is negative zero)
 - #87031 (Update reference.md)
 - #87037 (cleanup(rustdoc): remove unused function getObjectNameById)
 - #87045 (Fix tracking issue for `bool_to_option`)
 - #87049 (Account for `submodules = false` in config.toml when updating LLVM submodule)
 - #87061 (Do not suggest adding a semicolon after `?`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #87061 - FabianWolff:issue-87051, r=oli-obk
Yuki Okushi [Sun, 11 Jul 2021 19:32:05 +0000 (04:32 +0900)]
Rollup merge of #87061 - FabianWolff:issue-87051, r=oli-obk

Do not suggest adding a semicolon after `?`

Fixes #87051. I have only modified `report_return_mismatched_types()`, i.e. my changes only affect suggestions to add `;` for return type mismatches, but this never makes sense after `?`, because the function cannot return `()` if `?` is used (it has to return a `Result` or an `Option`), and a semicolon won't help if the expected and actual `Err` types differ, even if the expected one is `()`.

3 years agoRollup merge of #87049 - jyn514:no-submodules, r=Mark-Simulacrum
Yuki Okushi [Sun, 11 Jul 2021 19:32:04 +0000 (04:32 +0900)]
Rollup merge of #87049 - jyn514:no-submodules, r=Mark-Simulacrum

Account for `submodules = false` in config.toml when updating LLVM submodule

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

r? ``@Mark-Simulacrum`` cc ``@durin42``

3 years agoRollup merge of #87045 - jhpratt:fix-tracking-issue, r=jyn514
Yuki Okushi [Sun, 11 Jul 2021 19:32:03 +0000 (04:32 +0900)]
Rollup merge of #87045 - jhpratt:fix-tracking-issue, r=jyn514

Fix tracking issue for `bool_to_option`

The previous tracking issue was closed in favor of the current.

3 years agoRollup merge of #87037 - notriddle:notriddle/search-cleanup-getobjectnamefromid,...
Yuki Okushi [Sun, 11 Jul 2021 19:32:02 +0000 (04:32 +0900)]
Rollup merge of #87037 - notriddle:notriddle/search-cleanup-getobjectnamefromid, r=GuillaumeGomez

cleanup(rustdoc): remove unused function getObjectNameById

This function was used in an earlier version, when idx's were used to serialize function inputs and outputs. That's not done any more, so removed the JS-side support for it.

3 years agoRollup merge of #87031 - ZuseZ4:patch-1, r=GuillaumeGomez
Yuki Okushi [Sun, 11 Jul 2021 19:32:01 +0000 (04:32 +0900)]
Rollup merge of #87031 - ZuseZ4:patch-1, r=GuillaumeGomez

Update reference.md

I ran into a link to the outdated src/doc/reference.md here: https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098/6
Apparently the Rust reference has moved again, so the link gave a 404 error. This should fix it.

3 years agoRollup merge of #86951 - cyberia-ng:fp-negative-zero-sqrt-docs, r=Mark-Simulacrum
Yuki Okushi [Sun, 11 Jul 2021 19:31:59 +0000 (04:31 +0900)]
Rollup merge of #86951 - cyberia-ng:fp-negative-zero-sqrt-docs, r=Mark-Simulacrum

[docs] Clarify behaviour of f64 and f32::sqrt when argument is negative zero

From IEEE 754 section 6.3:
> Except that squareRoot(−0) shall be −0, every numeric squareRoot result shall have a positive sign.

3 years agoRollup merge of #86926 - bjorn3:update_some_deps, r=Mark-Simulacrum
Yuki Okushi [Sun, 11 Jul 2021 19:31:59 +0000 (04:31 +0900)]
Rollup merge of #86926 - bjorn3:update_some_deps, r=Mark-Simulacrum

Update regex crates

This removes two dependencies of rustbuild

3 years agoRollup merge of #73936 - zachlute:rustdoc-optflagmulti, r=jyn514
Yuki Okushi [Sun, 11 Jul 2021 19:31:58 +0000 (04:31 +0900)]
Rollup merge of #73936 - zachlute:rustdoc-optflagmulti, r=jyn514

Rustdoc: Change all 'optflag' arguments to 'optflagmulti'

Because specifying these flags multiple times will never be discernibly different in functionality from specifying them a single time, there is no reason to fail and report an error to the user.

This might be a slightly controversial change. it's tough to say, but it's hard to imagine a case where somebody was depending on this behavior, and doing this seem actively better for the user.

This originally came up in discussion of a fix for  [Cargo #8373](https://github.com/rust-lang/cargo/issues/8373), in [Cargo PR #8422](https://github.com/rust-lang/cargo/pull/8422).

The issue is that Cargo will automatically add things like `--document-private-items` to binaries, because it's the only thing that makes sense there. Then some poor user comes along and adds `--document-private-items` to their `rustdoc` flags for the project and suddenly they're getting errors for specifying a flag twice and need to track down which targets to actually add it to without getting duplicates for reasons they won't understand without deep understanding of Cargo behavior.

We're apparently hesitant to inspect `rustdoc` flags provided by the user directly in Cargo, because they're supposed to be opaque, so looking to see if it's already provided before adding it is evidently a non-starter. In trying to resolve that, one suggestion I came up with was to just change `rustdoc` to support passing the flag multiple times, because the user's intent should be clear and it's not *really* an error, so maybe this is a case of 'be permissive in what you accept'.

This PR is an attempt to do that in a straightforward manner for purposes of discussion.

3 years agoFix ICE with unsized type in const pattern
Fabian Wolff [Sun, 11 Jul 2021 17:16:26 +0000 (19:16 +0200)]
Fix ICE with unsized type in const pattern

3 years agoAuto merge of #85941 - cjgillot:qresolve, r=Aaron1011
bors [Sun, 11 Jul 2021 16:09:17 +0000 (16:09 +0000)]
Auto merge of #85941 - cjgillot:qresolve, r=Aaron1011

Reduce the amount of untracked state in TyCtxt -- Take 2

Main part of #85153

The offending line (https://github.com/rust-lang/rust/pull/85153#discussion_r642866298) is replaced by a FIXME until the possible bug and the perf concern are both resolved.

r? `@Aaron1011`

3 years agoAdd comments why install steps should never fail.
Eric Huss [Sun, 11 Jul 2021 16:01:31 +0000 (09:01 -0700)]
Add comments why install steps should never fail.

3 years agoDo not suggest adding a semicolon after `?`
Fabian Wolff [Sun, 11 Jul 2021 15:04:11 +0000 (17:04 +0200)]
Do not suggest adding a semicolon after `?`

3 years agoAuto merge of #87057 - RalfJung:miri, r=RalfJung
bors [Sun, 11 Jul 2021 13:45:37 +0000 (13:45 +0000)]
Auto merge of #87057 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/87030
Cc `@rust-lang/miri` r? `@ghost`

3 years agoupdate Miri
Ralf Jung [Sun, 11 Jul 2021 12:04:58 +0000 (14:04 +0200)]
update Miri

3 years agoAuto merge of #86995 - sexxi-goose:rewrite, r=nikomatsakis
bors [Sun, 11 Jul 2021 11:25:31 +0000 (11:25 +0000)]
Auto merge of #86995 - sexxi-goose:rewrite, r=nikomatsakis

2229: Rewrite/Refactor Closure Capture Analaysis

While handling all the differnet edge cases the code for the captur analysis got pretty compicated. Looking at the overall picture of the edge cases the rules can still be layed out simply.

Alogithm: https://hackmd.io/D3I_gwvuT-SPnJ22tgJumw

r? `@nikomatsakis`

Closes https://github.com/rust-lang/project-rfc-2229/issues/52
Implementation part of https://github.com/rust-lang/project-rfc-2229/issues/53

3 years agoAuto merge of #87042 - petrochenkov:cleanquotspan, r=Aaron1011
bors [Sun, 11 Jul 2021 08:46:43 +0000 (08:46 +0000)]
Auto merge of #87042 - petrochenkov:cleanquotspan, r=Aaron1011

Cleanup span quoting

I finally got to reviewing https://github.com/rust-lang/rust/pull/84278.
See the individual commit messages.
r? `@Aaron1011`

3 years agoAuto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett
bors [Sun, 11 Jul 2021 06:31:42 +0000 (06:31 +0000)]
Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett

Stabilize "RangeFrom" patterns in 1.55

Implements a partial stabilization of #67264 and #37854.
Reference PR: https://github.com/rust-lang/reference/pull/900

# Stabilization Report

This stabilizes the `X..` pattern, shown as such, offering an exhaustive match for unsigned integers:
```rust
match x as u32 {
      0 => println!("zero!"),
      1.. => println!("positive number!"),
}
```

Currently if a Rust author wants to write such a match on an integer, they must use `1..={integer}::MAX` . By allowing a "RangeFrom" style pattern, this simplifies the match to not require the MAX path and thus not require specifically repeating the type inside the match, allowing for easier refactoring. This is particularly useful for instances like the above case, where different behavior on "0" vs. "1 or any positive number" is desired, and the actual MAX is unimportant.

Notably, this excepts slice patterns which include half-open ranges from stabilization, as the wisdom of those is still subject to some debate.

## Practical Applications

Instances of this specific usage have appeared in the compiler:
https://github.com/rust-lang/rust/blob/16143d10679537d3fde4247e15334e78ad9d55b9/compiler/rustc_middle/src/ty/inhabitedness/mod.rs#L219
https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/compiler/rustc_ty_utils/src/ty.rs#L524

And I have noticed there are also a handful of "in the wild" users who have deployed it to similar effect, especially in the case of rejecting any value of a certain number or greater. It simply makes it much more ergonomic to write an irrefutable match, as done in Katholieke Universiteit Leuven's [SCALE and MAMBA project](https://github.com/KULeuven-COSIC/SCALE-MAMBA/blob/05e5db00d553573534258585651c525d0da5f83f/WebAssembly/scale_std/src/fixed_point.rs#L685-L695).

## Tests
There were already many tests in [src/test/ui/half-open-range/patterns](https://github.com/rust-lang/rust/tree/90a2e5e3fe59a254d4d707aa291517b3791ea5a6/src/test/ui/half-open-range-patterns), as well as [generic pattern tests that test the `exclusive_range_pattern` feature](https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs), many dating back to the feature's introduction and remaining standing to this day. However, this stabilization comes with some additional tests to explore the... sometimes interesting behavior of interactions with other patterns. e.g. There is, at least, a mild diagnostic improvement in some edge cases, because before now, the pattern `0..=(5+1)` encounters the `half_open_range_patterns` feature gate and can thus emit the request to enable the feature flag, while also emitting the "inclusive range with no end" diagnostic. There is no intent to allow an `X..=` pattern that I am aware of, so removing the flag request is a strict improvement. The arrival of the `J | K` "or" pattern also enables some odd formations.

Some of the behavior tested for here is derived from experiments in this [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=58777b3c715c85165ac4a70d93efeefc) example, linked at https://github.com/rust-lang/rust/issues/67264#issuecomment-812770692, which may be useful to reference to observe the current behavior more closely.

In addition tests constituting an explanation of the "slicing range patterns" syntax issue are included in this PR.

## Desiderata

The exclusive range patterns and half-open range patterns are fairly strongly requested by many authors, as they make some patterns much more natural to write, but there is disagreement regarding the "closed" exclusive range pattern or the "RangeTo" pattern, especially where it creates "off by one" gaps in the presence of a "catch-all" wildcard case. Also, there are obviously no range analyses in place that will force diagnostics for e.g. highly overlapping matches. I believe these should be warned on, ideally, and I think it would be reasonable to consider such a blocker to stabilizing this feature, but there is no technical issue with the feature as-is from the purely syntactic perspective as such overlapping or missed matches can already be generated today with such a catch-all case. And part of the "point" of the feature, at least from my view, is to make it easier to omit wildcard matches: a pattern with such an "open" match produces an irrefutable match and does not need the wild card case, making it easier to benefit from exhaustiveness checking.

## History

- Implemented:
  - Partially via exclusive ranges: https://github.com/rust-lang/rust/pull/35712
  - Fully with half-open ranges: https://github.com/rust-lang/rust/pull/67258
- Unresolved Questions:
  - The precedence concerns of https://github.com/rust-lang/rust/pull/48501 were considered as likely requiring adjustment but probably wanting a uniform consistent change across all pattern styles, given https://github.com/rust-lang/rust/issues/67264#issuecomment-720711656, but it is still unknown what changes might be desired
  - How we want to handle slice patterns in ranges seems to be an open question still, as witnessed in the discussion of this PR!

I checked but I couldn't actually find an RFC for this, and given "approved provisionally by lang team without an RFC", I believe this might require an RFC before it can land? Unsure of procedure here, on account of this being stabilizing a subset of a feature of syntax.

r? `@scottmcm`