<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_expand/src, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-10-02T08:27:49+00:00</updated>
<entry>
<title>Rollup merge of #146535 - joshtriplett:mbe-unsafe-attr, r=petrochenkov</title>
<updated>2025-10-02T08:27:49+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-10-02T08:27:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ac7beab527861103dd1e1515d534f87956786554'/>
<id>urn:sha1:ac7beab527861103dd1e1515d534f87956786554</id>
<content type='text'>
mbe: Implement `unsafe` attribute rules

This implements `unsafe attr` rules for declarative `macro_rules!` attributes, as specified in [RFC 3697](https://github.com/rust-lang/rfcs/pull/3697).

An invocation of an attribute that uses an `unsafe attr` rule requires the `unsafe(attr(...))` syntax.

An invocation of an attribute that uses an ordinary `attr` rule must *not* use the `unsafe(attr(...))` syntax.

`unsafe` is only supported on an `attr` rule, not any other kind of `macro_rules!` rule.

Tracking issue for `macro_rules!` attributes: https://github.com/rust-lang/rust/issues/143547
</content>
</entry>
<entry>
<title>mbe: `expand_invoc`: Add comment about not needing to check safety of `LegacyAttr` here</title>
<updated>2025-10-01T23:19:39+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-09-28T16:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4fc0a0d42a66e9b248fa527f7f063ec7226803dd'/>
<id>urn:sha1:4fc0a0d42a66e9b248fa527f7f063ec7226803dd</id>
<content type='text'>
`LegacyAttr` is only used for builtin attributes, and builtin attributes
have their safety checked by `check_attribute_safety`, so we don't need
to check `unsafety` here.
</content>
</entry>
<entry>
<title>mbe: Support `unsafe` attribute rules</title>
<updated>2025-10-01T23:19:39+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-09-14T08:17:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6bff1abf9d3c171d2380aacb8b4c6f52580192b3'/>
<id>urn:sha1:6bff1abf9d3c171d2380aacb8b4c6f52580192b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mbe: Rename a local variable to match corresponding field names</title>
<updated>2025-10-01T23:19:39+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-09-14T06:32:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=30d57abccf7d55e9dd4e36be583c55f6b0090302'/>
<id>urn:sha1:30d57abccf7d55e9dd4e36be583c55f6b0090302</id>
<content type='text'>
This simplifies subsequent initialization of enum variants.
</content>
</entry>
<entry>
<title>Rollup merge of #147040 - joshtriplett:mbe-fix-comments, r=petrochenkov</title>
<updated>2025-09-29T19:42:42+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-29T19:42:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=618942b86f22b6f9fc95e361b28aab6cf98ee182'/>
<id>urn:sha1:618942b86f22b6f9fc95e361b28aab6cf98ee182</id>
<content type='text'>
mbe: macro_check: Fix function comments referencing non-existent parameters

Several functions had comments referencing a non-existent `valid`
parameter. Remove those. The `guar` parameter that handles errors is
already documented.

In the process, remove another duplicate reference to an
already-documented parameter (`binders`).
</content>
</entry>
<entry>
<title>Rollup merge of #147031 - joshtriplett:mbe-opt-collect, r=lcnr</title>
<updated>2025-09-26T16:11:14+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-26T16:11:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=978c960ed628e55e6c9d261eb7f15d593c69688e'/>
<id>urn:sha1:978c960ed628e55e6c9d261eb7f15d593c69688e</id>
<content type='text'>
mbe: Simplify check_redundant_vis_repetition

Eliminate a use of `map_or` in favor of a match.

Inline some variable definitions that don't add clarity, and that
prevent short-circuiting.
</content>
</entry>
<entry>
<title>Rollup merge of #146849 - joshtriplett:macro-reduce-legacy-bang, r=petrochenkov</title>
<updated>2025-09-26T16:11:12+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-26T16:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ba93a4f6743e46250e1a01359244914a4186dadc'/>
<id>urn:sha1:ba93a4f6743e46250e1a01359244914a4186dadc</id>
<content type='text'>
Reduce some uses of `LegacyBang`

- **Switch `dummy_bang` from `LegacyBang` to `Bang`**
- **mbe: Switch dummy extension used for errors from `LegacyBang` to `Bang`**
</content>
</entry>
<entry>
<title>mbe: Simplify check_redundant_vis_repetition</title>
<updated>2025-09-25T14:54:28+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-09-25T14:43:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9e3f7487e9e572aee95381688bda52525d79b005'/>
<id>urn:sha1:9e3f7487e9e572aee95381688bda52525d79b005</id>
<content type='text'>
Eliminate a use of `map_or` in favor of a match.

Inline some variable definitions that don't add clarity, and that
prevent short-circuiting.
</content>
</entry>
<entry>
<title>mbe: macro_check: Fix function comments referencing non-existent parameters</title>
<updated>2025-09-25T14:18:36+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-09-25T14:18:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89a3a445bfb31637549e4f1a652869f631416c73'/>
<id>urn:sha1:89a3a445bfb31637549e4f1a652869f631416c73</id>
<content type='text'>
Several functions had comments referencing a non-existent `valid`
parameter. Remove those. The `guar` parameter that handles errors is
already documented.

In the process, remove another duplicate reference to an
already-documented parameter (`binders`).
</content>
</entry>
<entry>
<title>Rollup merge of #146802 - joshtriplett:mbe-simplifications, r=petrochenkov</title>
<updated>2025-09-23T16:13:54+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-23T16:13:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=15c323fa6dde15d75e1aaf6597aaf6a9bcc083a9'/>
<id>urn:sha1:15c323fa6dde15d75e1aaf6597aaf6a9bcc083a9</id>
<content type='text'>
mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using `Ident::as_str` and doing string
comparisons; I converted them to use symbols.

I factored out a function for transcribing a `ParseNtResult`, which will help
separate the evaluation and transcription of future macro metavariable
expressions.
</content>
</entry>
</feed>
