Repository navigation
Migrate built-in macros pattern_type & view_type to macros 2.0 that expand to internal syntax - #165487
Migrate built-in macros pattern_type & view_type to macros 2.0 that expand to internal syntax#165487fmease wants to merge 3 commits into
pattern_type & view_type to macros 2.0 that expand to internal syntax#165487Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu
cc @rust-lang/miri
cc @rust-lang/clippy |
|
r? @mati865 rustbot has assigned @mati865. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
da7d5bf to
a02f646
Compare
|
cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
a02f646 to
9b599a1
Compare
This comment has been minimized.
This comment has been minimized.
9b599a1 to
ca6cb90
Compare
…ition, r=jieyouxu compiletest: Fix the edition of minicore to the latest stable one ...instead of using whatever edition the dependent / the reverse dependency is using (!). Context: rust-lang#165479 (comment). Unblocks PR rust-lang#165487. r? @jieyouxu (no rush) <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
This comment has been minimized.
This comment has been minimized.
…ition, r=jieyouxu compiletest: Fix the edition of minicore to the latest stable one ...instead of using whatever edition the dependent / the reverse dependency is using (!). Context: rust-lang#165479 (comment). Unblocks PR rust-lang#165487. r? @jieyouxu (no rush) <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…ition, r=jieyouxu compiletest: Fix the edition of minicore to the latest stable one ...instead of using whatever edition the dependent / the reverse dependency is using (!). Context: rust-lang#165479 (comment). Unblocks PR rust-lang#165487. r? @jieyouxu (no rush) <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
ca6cb90 to
7a164f7
Compare
Rollup merge of #165483 - fmease:comptest-fixate-minicore-edition, r=jieyouxu compiletest: Fix the edition of minicore to the latest stable one ...instead of using whatever edition the dependent / the reverse dependency is using (!). Context: #165479 (comment). Unblocks PR #165487. r? @jieyouxu (no rush) <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
7a164f7 to
8f7bf49
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
pattern_type & view_type to macros 2.0 that expand to internal syntaxpattern_type & view_type to macros 2.0 that expand to internal syntax
Just because the parser of a specific syntax fragment kind returns an `Err(_)` doesn't automatically mean that the problematic token sequence isn't "of" that fragment's kind. The token sequence might "almost" be of that kind (i.e., share a non-empty prefix) but simply contain a syntax error in it. On a side note, it's rather odd that the now removed `annotate_err_with_kind` only added the note "this macro call doesn't expand to a $fragkind" if the target fragment kind was *type* or *pat*, there are 20 kinds at the of writing.
…..)` This also means that it's now available under `core::pat` instead of `core` directly. This makes it consistent with the `std` re-export which is only available under `std::pat` and not under `std` directly. Moreover, drop library feature `pattern_type_macro` and demote language feature `pattern_types` to a library feature. This is nice because it means `std::pat::pattern_type` is no longer unnecessarily gated behind two (!) feature gates.
This also means that it's now available under `core::view` instead of `core` directly. This makes it consistent with the `std` re-export which is only available under `std::view` and not under `std` directly. Moreover, drop library feature `view_type_macro` and demote language feature `view_types` to a library feature. This is nice because it means `std::view::view_type` is no longer unnecessarily gated behind two (!) feature gates.
Part of MCP-approved #110680.
Best reviewed commit by commit. Please see individual commit messages for further details.
Pinging owner of pattern types @oli-obk & owner of view types @scrabsha for visibility.
(No LLM was or will be used by me during the entire creation process of this PR)