Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize :pat_param and remove :pat2021 #83386

Merged
merged 4 commits into from
Apr 28, 2021

Conversation

mark-i-m
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 22, 2021
@nikomatsakis
Copy link
Contributor

The main reason I have not r+'d this is that there was some active debate about the best name. There are two proposals on the table:

  • introduce pat2015 and pat2021 and pat changes from pat2015 to pat2021 in the Rust 2021 edition
    • pro: one can reference either meaning easily in any edition
    • con: the edition-based names are not very meaningful, and there are still valid reasons beyond back-compat to use pat2015 (if you want a single pattern and not a list of them)
  • introduce pat_atom for the current pat, and change pat to |-separated list in 2021 Edition
    • pro: 'pat atom' is a reasonably meaningful name, though kind of parser jargon
    • con: no way to reference |-pattern in older editions
  • introduce pats and leave pat unchanged
    • pro: backwards compatible
    • con: most uses of pat could actually accept | and now they don't work

As far as I know, the final option was rejected and nobody is asking for it, but I included it out of completeness. Some other possible names for pat-atom:

  • pat_single
  • pat_no_or
  • pat1

@nikomatsakis nikomatsakis added I-nominated T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Apr 1, 2021
@joshtriplett
Copy link
Member

I think there's value in going ahead with the name pat2015 regardless. If it turns out that a significant number of people want to use pat2015 in later editions for reasons other than edition migration, we can always introduce an alias like pat_no_or later, while still keeping pat2015. But I think the name pat2015 is usefully evocative for the purposes of edition migration.

@m-ou-se
Copy link
Member

m-ou-se commented Apr 2, 2021

pat2015 seems like the least useful name of all possibilities. "whatever pat meant in 2015 if you can still remember" isn't a very meaningful name, especially since the difference is very simple (not allowing |) which we can also express directly in the name. Considering we already know about valid use cases where you want the non-or variant (e.g. |$arg:pat_atom| $e:expr), I don't think we should make this mistake on purpose and only fix it when it turns out to affect more people that we like, since we can easily just fix it now.

@joshtriplett
Copy link
Member

I'm not arguing against having another name for it, and if we believe people are likely to end up needing it, I don't object to giving it another name; I'm just trying to make it not a blocker for the edition, by raising the possibility of introducing an alias later. If we can agree on a name quickly, that works.

I think pat_atom is not a good name; it feels like it's seen through a compiler view, and I don't think we use "atom" anywhere else. If we're going to give it a describe name, I think pat_no_or seems reasonable.

I mildly like the idea of keeping pat2015 and making any other name an alias, for simplicity's sake when doing an edition migration. But I won't push for that idea, and I won't object to just calling it pat_no_or or similar.

@nikomatsakis
Copy link
Contributor

I think pat_atom is not a good name; it feels like it's seen through a compiler view, and I don't think we use "atom" anywhere else. If we're going to give it a describe name, I think pat_no_or seems reasonable.

I think pat_no_or was @m-ou-se's first suggestion. I counterproposed pat_atom because I would prefer a name that describes what it is, not what it isn't. That said, I agree that "atom" isn't the best -- it makes sense to me, because it's the "atom" from which a full pattern pat is created, but it's not ideal.

I appreciate your point Josh about unblocking the edition. On the other hand, I don't think I want a ton of aliases for the same thing and we're not like "up against it" when it comes to edition timing. I don't want a long bikeshed, but it seems like we can indulge a short one.

I think I'd prefer to zoom out a bit and think about general Edition policy. The question here really seems to be: do we always introduce a 2015 vs 2021 name, or do we only do that when the 2015 item is effectively deprecated and we don't expect anyone to use it. @m-ou-se is arguing for the former, and I think @joshtriplett you are (perhaps implicitly) arguing for the latter. I'm not 100% sure what I believe, but I would prefer we pick the choice we think the end user would want and not let timing dictate it unless we have to.

@nikomatsakis
Copy link
Contributor

When it comes to the name itself, can we spend a bit of time brainstorming options?

I will say that pat_no_or seems clear, though I wonder if it would seem as clear if you weren't coming into the middle of all this context.

Also, I could imagine this pattern arising in other places too with other separators and I'd prefer if we had a name that could be re-used -- although that may be a fool's errand. I guess a pattern (e.g., expr_no_comma or something) that can be reused is also decent. As I wrote, pat_atom was meant to convey the "atom from which a full pattern is composed", but it's not ideal for the reasons given.

single_pat is the next thing I thought of, but I think it should have the form pat_XX. It's too bad English puts adjectives first, it doesn't play well with sorting alphabetically. =) pat_single or pat_one doesn't feel ... as obvious.

pat_element?

@digama0
Copy link
Contributor

digama0 commented Apr 2, 2021

I will put in a vote for pat1, it's short and indicates that it is related to pat.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 2, 2021

I think that instead of just tossing out names, we should submit entries based on what the rust reference might say. Here is the relevant part of the rust reference. Currently it says pat: a Pattern. I guess it would be something like

  • pat -- a Pattern like Some(_); patterns can include |, so this also matches Some(_) | None
  • pat1 -- a single Pattern, excluding | at the top level

It's actually kind of hard to write! I feel like I want another noun.

@m-ou-se
Copy link
Member

m-ou-se commented Apr 2, 2021

The definition at https://doc.rust-lang.org/reference/patterns.html right now doesn't allow for Some(_) | None, right? I don't see anything there that would cover |. I suppose the reference will also need a way to refer to 'pattern with |' and 'pattern without |'.

@digama0
Copy link
Contributor

digama0 commented Apr 2, 2021

I think that instead of just tossing out names, we should submit entries based on what the rust reference might say. Here is the relevant part of the rust reference. Currently it says pat: a Pattern. I guess it would be something like

* `pat` -- a [Pattern](https://doc.rust-lang.org/reference/patterns.html) like `Some(_)`; patterns can include `|`, so this also matches `Some(_) | None`

* `pat1` -- a single [Pattern](https://doc.rust-lang.org/reference/patterns.html), excluding `|` at the top level

It's actually kind of hard to write! I feel like I want another noun.

Actually, the way it is stated in the reference, it isn't difficult at all. Each matcher just points to a nonterminal in the BNF, so it would just be "a [Pattern]" and "a [PatternWithoutOr]" with links to the respective BNF productions (note that Pattern and PatternWithoutOr are mutually recursive, so they will both exist in the BNF anyway). I just noticed that PatternWithoutRange already exists, so there is a precedent for this.

@nikomatsakis
Copy link
Contributor

@m-ou-se yes, the reference is typically not updated until the stabilization is complete, though there ought to be a pending PR-- ah, there it is, @mark-i-m opened rust-lang/reference#957.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 2, 2021

@digama0 right, but I would like people to not have to read the BNF -- I also think the name of the production should (ideally) line up with the fragment specifier name. So that suggests naming things pat_no_or and PatNoOr (and PatNoRange) if we want to follow that precedent. I guess my resistance is weakening. =) I don't think this is that important.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 2, 2021

I'd still like to see the docs written. Maybe something like this?

  • pat -- matches a Pattern like Some(_) or Some(_) | None
  • pat_no_or -- matches PatternNoOr, which is a pattern that excludes | (e.g., Some(_) or None but not Some(_) | None)

@digama0
Copy link
Contributor

digama0 commented Apr 2, 2021

For completeness, @mark-i-m 's PR proposes PatternNoTopAlt for the name in the BNF instead of PatternWithoutOr.

@m-ou-se
Copy link
Member

m-ou-se commented Apr 2, 2021

@m-ou-se yes, the reference is typically not updated until the stabilization is complete, though there ought to be a pending PR-- ah, there it is, @mark-i-m opened rust-lang/reference#957.

What I meant is that the reference will also need a word to refer to these 'not-or patterns', and it'd be good if the :pat2015 name is the same or similar as what the reference uses/will use.

That PR proposes PatternNoTopAlt in the reference, which would match something like :pat_no_top_alt. I'd prefer an alternative, but it'd be good to consider the name in the reference and the name for :pat2015 together.

@nikomatsakis
Copy link
Contributor

I definitely think "no top alt" is not a very obvious name :)

@nikomatsakis
Copy link
Contributor

Ah, actually, what about pat_alternative as a name instead of pat_atom? Then the write-up is something like:

  • pat -- a [Pattern] like Some(_); patterns can include a number of alternatives separated by |, so this also matches Some(_) | None
  • pat_alternative -- a single [PatternAlternative], like Some(_) or None (but not Some(_) | None, although | can be embedded via parentheses)

@mark-i-m
Copy link
Member Author

mark-i-m commented Apr 6, 2021

FWIW, "no top alt" is the name from the RFC. I agree it's not a great name.

Also, I would like to point out that pat_no_or sounds like or-patterns are entirely disabled, whereas we only disallow them at the top level.

How about subpat? i.e. we would have pat which allows top-level or, and subpat which doesn't.

@nikomatsakis
Copy link
Contributor

@mark-i-m can you phrase that suggestion as "text in the reference"? I'd like to see how it looks.

@mark-i-m
Copy link
Member Author

mark-i-m commented Apr 6, 2021

@nikomatsakis perhaps something like:

  • pat -- any [Pattern], e.g. Some(foo) or Enum::A | Enum::B. This includes all types of patterns, including any number of subpatterns or'ed together (with |), as long as the types and bindings agree.
  • subpat -- any [PatternNoTopAlt] (aside: perhaps we change the name of the production to SubPattern?), e.g. Some(foo) or Enum::A or Enum::B. This includes any individual subpattern that can appear in a pat, but it does not allow top-level or-patterns, like pat does.

@nikomatsakis
Copy link
Contributor

@mark-i-m thanks. I guess I think "subpattern" is viable. I think I vaguely prefer pat_alternative, because it is more specific and because it also starts with pat, so it'll appear in the right place when lists are alphabetically ordered. But it's a weak preference.

@digama0
Copy link
Contributor

digama0 commented Apr 9, 2021

The issue I have with pat_alternative with pat is that I read it the other way around: if those were the names, then I would expect pat to be just a single pattern and pat_alternative contains alternatives of patterns, i.e. pat | pat.

@nikomatsakis
Copy link
Contributor

@digama0 ah, that's useful feedback. I can see that.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 14, 2021

OK, it seems like we've collected a number of options and we can now kind of pull them into a write-up for comparison and just pick one. Folks who care can vote using emoji =) cc @rust-lang/lang

(As always, votes are informative, not binding)

Emoji With pipe Without pipe As it would appear in the reference...
👍 pat subpat link
👎 pat pat_alternative link
😁 pat pat_atom not written
🎉 pat pat_no_or not written
😕 pat pat_no_top_alt not written

Some notes:

  • Atom strikes some as jargon
  • Alternative was understood by some as meaning "contains multiple alternatives", not "a single alternative"
  • The "without |" can always use parentheses to include multiple patterns

@m-ou-se
Copy link
Member

m-ou-se commented Apr 14, 2021

So we wanted to change the meaning of :pat to include or-patterns, but it turned out we actually want to keep the old meaning of :pat around too (and not just for migration). So now the plan is to still change the meaning of :pat and add a new word to take on the old meaning of :pat. Does that still make sense with this new insight?

Why not just keep :pat for non-or-patterns? Then the 'one or more patterns separated by |' can just be a new word (e.g. the plural version :pats or something). Then it's no longer an edition change, and doesn't require a migration. It'd also be easier to document.

@nikomatsakis
Copy link
Contributor

Notes from lang team planning meeting:

  • subpat assumes no further "subsets" of patterns will be chosen
  • we do want it to alphabetize when you type it
  • pat_no_or would be used for closure arguments; can we have something that talks about that (e.g., pat_arg, pat_param -- pattern for a closure argument)
  • pat_param is preferred because it is a parameter, not the argument passed to a call
  • meeting recommendation: pat_param! 🎉

@nikomatsakis
Copy link
Contributor

So, @mark-i-m, reviewing the PR, it doesn't quite match my expectation. I did not expect to have pat2021, just the new version of pat. The idea then would be that we will migrate things to use pat_param where needed, so that they are compatible when they move to Rust 2021.

@mark-i-m
Copy link
Member Author

@nikomatsakis The behavior currently implemented is:

  • all editions:
    • pat_param does not match or-patterns
    • pat2021 does match or-patterns
    • pat2021 is unstable behind gate edition_macro_pats
  • edition 2015/18: pat == pat_param
  • edition 2021: pat == pat2021

In the implementation, pat desugars to either pat_param or pat2021 depending on the edition of the code defining the macro.

Does that match your expectation? Or am I misunderstanding something?

@nikomatsakis
Copy link
Contributor

@mark-i-m the main surprise is that I don't expect to have a pat2021 nonterminal available to end-users at all.

That said, I don't actually have a problem with it; thinking more about it, I might even be in favor, as it fits our general approach of exposing functionality to older editions (e.g., via k#foo keywords) when we can easily do so.

I'm not 100% sure what the FCP decision was, but I'd be curious to hear what the rest of @rust-lang/lang thinks about this.

I think I am now in favor of landing "as is".

@nikomatsakis
Copy link
Contributor

Leaving this nominated for the @rust-lang/lang triage meeting today.

@ehuss
Copy link
Contributor

ehuss commented Apr 27, 2021

Just checking if this is likely to merge in 1.53 (before Friday, or a beta backport later). I'd like to know if it should be included in rust-lang/reference#957. I don't think we have ever done documentation backports, though I guess that is possible, I would prefer to avoid it if we know how this PR will shake out.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Apr 27, 2021

We discussed this in today's @rust-lang/lang meeting and the meeting consensus, I believe, was that we should expose the following specifiers:

Specified Before Rust 2021 As of Rust 2021
pat_param patterns without OR patterns without OR
pat patterns without OR patterns with OR

and have no pat2021 fragment specifier externally.

Some notes about our reasoning:

  • Question:
    • do we have pat2021 that is 'pat with |' in all editions
  • Reason to do so:
    • It is nice if older editions can access newer semantics, albeit with a more confusing way
  • Reasons not to do so:
    • (a) they can acccess the newer semantics by doing $($p:pat)|+ (or by upgrading to the newer edition)
      • But: this is significant more complex and they may well make a subtle mistake
        • But: macros do this today
      • But: why not adopt newer edition? probably because want support for old compiler
    • (b) newer editions have no use for this because it's just the same as pat
    • (c) if we add a new variant of pat, we can give it a meaningful name like pat_param at that time
    • (d) cruft, YAGNI
      • It would be a shame if we ended up with a big list of pat2021, pat2027, ...
  • Precedent:
    • we tend to give years for 'old names that are deprecated but retained for backwards compat'

@mark-i-m mark-i-m changed the title Stabilize :pat_param but leave :pat2021 gated Stabilize :pat_param and remove :pat2021 Apr 28, 2021
@mark-i-m
Copy link
Member Author

@nikomatsakis Should be ready. Let me know what you think. Thanks!

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 28, 2021

📌 Commit 2a9db91 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 28, 2021
@bors
Copy link
Contributor

bors commented Apr 28, 2021

⌛ Testing commit 2a9db91 with merge ca075d2...

@bors
Copy link
Contributor

bors commented Apr 28, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing ca075d2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 28, 2021
@bors bors merged commit ca075d2 into rust-lang:master Apr 28, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 28, 2021
@mark-i-m mark-i-m deleted the stabilize-pat2015 branch April 29, 2021 01:21
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 29, 2021
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Jun 20, 2021
Pkgsrc changes:
 * Bump bootstrap requirements to 1.52.1
 * Adjust patches, adapt to upstream changes, adjust cargo checksums
 * If using an external llvm, require >= 10.0

Upsteream changes:

Version 1.53.0 (2021-06-17)
============================

Language
-----------------------
- [You can now use unicode for identifiers.][83799] This allows
  multilingual identifiers but still doesn't allow glyphs that are
  not considered characters such as `#` (diamond) or `<U+1F980>`
  (crab). More specifically you can now use any identifier that
  matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This
  is the same standard as languages like Python, however Rust uses NFC
  normalization which may be different from other languages.
- [You can now specify "or patterns" inside pattern matches.][79278]
  Previously you could only use `|` (OR) on complete patterns. E.g.
  ```rust
  let x = Some(2u8);
  // Before
  matches!(x, Some(1) | Some(2));
  // Now
  matches!(x, Some(1 | 2));
  ```
- [Added the `:pat_param` `macro_rules!` matcher.][83386] This matcher
  has the same semantics as the `:pat` matcher. This is to allow `:pat`
  to change semantics to being a pattern fragment in a future edition.

Compiler
-----------------------
- [Updated the minimum external LLVM version to LLVM 10.][83387]
- [Added Tier 3\* support for the `wasm64-unknown-unknown` target.][80525]
- [Improved debuginfo for closures and async functions on Windows MSVC.][83941]

\* Refer to Rust's [platform support page][platform-support-doc] for more
information on Rust's tiered platform support.

Libraries
-----------------------
- [Abort messages will now forward to `android_set_abort_message` on
  Android platforms when available.][81469]
- [`slice::IterMut<'_, T>` now implements `AsRef<[T]>`][82771]
- [Arrays of any length now implement `IntoIterator`.][84147]
  Currently calling `.into_iter()` as a method on an array will
  return `impl Iterator<Item=&T>`, but this may change in a
  future edition to change `Item` to `T`. Calling `IntoIterator::into_iter`
  directly on arrays will provide `impl Iterator<Item=T>` as expected.
- [`leading_zeros`, and `trailing_zeros` are now available on all
  `NonZero` integer types.][84082]
- [`{f32, f64}::from_str` now parse and print special values
  (`NaN`, `-0`) according to IEEE RFC 754.][78618]
- [You can now index into slices using `(Bound<usize>, Bound<usize>)`.][77704]
- [Add the `BITS` associated constant to all numeric types.][82565]

Stabilised APIs
---------------
- [`AtomicBool::fetch_update`]
- [`AtomicPtr::fetch_update`]
- [`BTreeMap::retain`]
- [`BTreeSet::retain`]
- [`BufReader::seek_relative`]
- [`DebugStruct::non_exhaustive`]
- [`Duration::MAX`]
- [`Duration::ZERO`]
- [`Duration::is_zero`]
- [`Duration::saturating_add`]
- [`Duration::saturating_mul`]
- [`Duration::saturating_sub`]
- [`ErrorKind::Unsupported`]
- [`Option::insert`]
- [`Ordering::is_eq`]
- [`Ordering::is_ge`]
- [`Ordering::is_gt`]
- [`Ordering::is_le`]
- [`Ordering::is_lt`]
- [`Ordering::is_ne`]
- [`OsStr::is_ascii`]
- [`OsStr::make_ascii_lowercase`]
- [`OsStr::make_ascii_uppercase`]
- [`OsStr::to_ascii_lowercase`]
- [`OsStr::to_ascii_uppercase`]
- [`Peekable::peek_mut`]
- [`Rc::decrement_strong_count`]
- [`Rc::increment_strong_count`]
- [`Vec::extend_from_within`]
- [`array::from_mut`]
- [`array::from_ref`]
- [`char::MAX`]
- [`char::REPLACEMENT_CHARACTER`]
- [`char::UNICODE_VERSION`]
- [`char::decode_utf16`]
- [`char::from_digit`]
- [`char::from_u32_unchecked`]
- [`char::from_u32`]
- [`cmp::max_by_key`]
- [`cmp::max_by`]
- [`cmp::min_by_key`]
- [`cmp::min_by`]
- [`f32::is_subnormal`]
- [`f64::is_subnormal`]

Cargo
-----------------------
- [Cargo now supports git repositories where the default `HEAD` branch is not
  "master".][cargo/9392] This also includes a switch to the version
  3 `Cargo.lock` format which can handle default branches correctly.
- [macOS targets now default to `unpacked` split-debuginfo.][cargo/9298]
- [The `authors` field is no longer included in `Cargo.toml` for new
  projects.][cargo/9282]

Rustdoc
-----------------------
- [Added the `rustdoc::bare_urls` lint that warns when you have URLs
  without hyperlinks.][81764]

Compatibility Notes
-------------------
- [Implement token-based handling of attributes during expansion][82608]
- [`Ipv4::from_str` will now reject octal format IP addresses in addition
  to rejecting hexadecimal IP addresses.][83652] The octal format can lead
  to confusion and potential security vulnerabilities and [is no
  longer recommended][ietf6943].

Internal Only
-------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of rustc and
related tools.

- [Rework the `std::sys::windows::alloc` implementation.][83065]
- [rustdoc: Don't enter an infer_ctxt in get_blanket_impls for
  impls that aren't blanket impls.][82864]
- [rustdoc: Only look at blanket impls in `get_blanket_impls`][83681]
- [Rework rustdoc const type][82873]

[83386]: rust-lang/rust#83386
[82771]: rust-lang/rust#82771
[84147]: rust-lang/rust#84147
[84082]: rust-lang/rust#84082
[83799]: rust-lang/rust#83799
[83681]: rust-lang/rust#83681
[83652]: rust-lang/rust#83652
[83387]: rust-lang/rust#83387
[82873]: rust-lang/rust#82873
[82864]: rust-lang/rust#82864
[82608]: rust-lang/rust#82608
[82565]: rust-lang/rust#82565
[80525]: rust-lang/rust#80525
[79278]: rust-lang/rust#79278
[78618]: rust-lang/rust#78618
[77704]: rust-lang/rust#77704
[83941]: rust-lang/rust#83941
[83065]: rust-lang/rust#83065
[81764]: rust-lang/rust#81764
[81469]: rust-lang/rust#81469
[cargo/9298]: rust-lang/cargo#9298
[cargo/9282]: rust-lang/cargo#9282
[cargo/9392]: rust-lang/cargo#9392
[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX
[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER
[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION
[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16
[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32
[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked
[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
[`AtomicBool::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update
[`AtomicPtr::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update
[`BTreeMap::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain
[`BTreeSet::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.retain
[`BufReader::seek_relative`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.seek_relative
[`DebugStruct::non_exhaustive`]: https://doc.rust-lang.org/std/fmt/struct.DebugStruct.html#method.finish_non_exhaustive
[`Duration::MAX`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.MAX
[`Duration::ZERO`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.ZERO
[`Duration::is_zero`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.is_zero
[`Duration::saturating_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_add
[`Duration::saturating_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_mul
[`Duration::saturating_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_sub
[`ErrorKind::Unsupported`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Unsupported
[`Option::insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.insert
[`Ordering::is_eq`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_eq
[`Ordering::is_ge`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ge
[`Ordering::is_gt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_gt
[`Ordering::is_le`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_le
[`Ordering::is_lt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_lt
[`Ordering::is_ne`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ne
[`OsStr::eq_ignore_ascii_case`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.eq_ignore_ascii_case
[`OsStr::is_ascii`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.is_ascii
[`OsStr::make_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_lowercase
[`OsStr::make_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_uppercase
[`OsStr::to_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_lowercase
[`OsStr::to_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_uppercase
[`Peekable::peek_mut`]: https://doc.rust-lang.org/std/iter/struct.Peekable.html#method.peek_mut
[`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
[`Rc::increment_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
[`Vec::extend_from_within`]: https://doc.rust-lang.org/beta/std/vec/struct.Vec.html#method.extend_from_within
[`array::from_mut`]: https://doc.rust-lang.org/beta/std/array/fn.from_mut.html
[`array::from_ref`]: https://doc.rust-lang.org/beta/std/array/fn.from_ref.html
[`cmp::max_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by_key.html
[`cmp::max_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by.html
[`cmp::min_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by_key.html
[`cmp::min_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by.html
[`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
[`f64::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
[ietf6943]: https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1
@pravic
Copy link
Contributor

pravic commented Jun 23, 2021

It looks like the Reference hasn't been updated: https://doc.rust-lang.org/reference/macros-by-example.html

@ehuss
Copy link
Contributor

ehuss commented Jun 23, 2021

It is updated in beta: https://doc.rust-lang.org/beta/reference/macros-by-example.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.