<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/tools, branch lcnr/rustc-dev-guide</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-13T22:52:17+00:00</updated>
<entry>
<title>Auto merge of #144793 - petrochenkov:extprel3, r=davidtwco</title>
<updated>2025-08-13T22:52:17+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-08-13T22:52:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8e7795415acaa9471b5eeb2301915d6996d289ec'/>
<id>urn:sha1:8e7795415acaa9471b5eeb2301915d6996d289ec</id>
<content type='text'>
resolve: Split extern prelude into two scopes

One scope for `extern crate` items and another for `--extern` options, with the former shadowing the latter.

If in a single scope some things can overwrite other things, especially with ad hoc restrictions like `MacroExpandedExternCrateCannotShadowExternArguments`, then it's not really a single scope.
So this PR splits `Scope::ExternPrelude` into two cleaner scopes.

This is similar to how https://github.com/rust-lang/rust/pull/144131 splits module scope into two scopes for globs and non-globs, but simpler.
</content>
</entry>
<entry>
<title>Rollup merge of #145153 - joshtriplett:macro-kinds-plural, r=petrochenkov</title>
<updated>2025-08-13T16:43:01+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-08-13T16:43:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bd6fb635965cbbc8c70f5e011b5c19711e52a5fe'/>
<id>urn:sha1:bd6fb635965cbbc8c70f5e011b5c19711e52a5fe</id>
<content type='text'>
Handle macros with multiple kinds, and improve errors

(I recommend reviewing this commit-by-commit.)

Switch to a bitflags `MacroKinds` to support macros with more than one kind

Review everything that uses `MacroKind`, and switch anything that could refer to more than one kind to use `MacroKinds`.

Add a new `SyntaxExtensionKind::MacroRules` for `macro_rules!` macros, using the concrete `MacroRulesMacroExpander` type, and have it track which kinds it can handle. Eliminate the separate optional `attr_ext`, now that a `SyntaxExtension` can handle multiple macro kinds.

This also avoids the need to downcast when calling methods on `MacroRulesMacroExpander`, such as `get_unused_rule`.

Integrate macro kind checking into name resolution's `sub_namespace_match`, so that we only find a macro if it's the right type, and eliminate the special-case hack for attributes.

This allows detecting and report macro kind mismatches early, and more precisely, improving various error messages. In particular, this eliminates the case in `failed_to_match_macro` to check for a function-like invocation of a macro with no function-like rules.

Instead, macro kind mismatches now result in an unresolved macro, and we detect this case in `unresolved_macro_suggestions`, which now carefully distinguishes between a kind mismatch and other errors.

This also handles cases of forward-referenced attributes and cyclic attributes.

----

In this PR, I've minimally fixed up `rustdoc` so that it compiles and passes tests. This is just the minimal necessary fixes to handle the switch to `MacroKinds`, and it only works for macros that don't actually have multiple kinds. This will panic (with a `todo!`) if it encounters a macro with multiple kinds.

rustdoc needs further fixes to handle macros with multiple kinds, and to handle attributes and derive macros that aren't proc macros. I'd appreciate some help from a rustdoc expert on that.

----

r? ````````@petrochenkov````````
</content>
</entry>
<entry>
<title>Update clippy tests</title>
<updated>2025-08-13T16:29:53+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2025-08-13T16:29:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9aa6cb5e56bc1987974bfa176e68281edd56ca8d'/>
<id>urn:sha1:9aa6cb5e56bc1987974bfa176e68281edd56ca8d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #144722 - ywxt:parallel-reproducibile, r=SparrowLii</title>
<updated>2025-08-13T10:39:15+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-08-13T10:39:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=350d0ef0ec0493e6d21cfb265cb8211a0e74d766'/>
<id>urn:sha1:350d0ef0ec0493e6d21cfb265cb8211a0e74d766</id>
<content type='text'>
Fix parallel rustc not being reproducible due to unstable sorts of items

Currently, A tuple `(DefId, SymbolName)` is used to determine the order of items in the final binary. However `DefId` is expected as non-deterministic, which leads to some not reproducible issues under parallel compilation. (See https://github.com/rust-lang/rust/issues/140425#issuecomment-3111802148)

Theoretically, we don't need the sorting because the order of these items is already deterministic.

However, codegen tests reply on the same order of items  between in binary and source.

So here we added a new option `codegen-source-order` to indicate whether sorting based on the order in source. For codegen tests, items are sorted according to the order in the source code, whereas in the normal path, no sorting is performed.

Specially, for codegen tests, in preparation for parallel compilation potentially being enabled by default in the future,  we use `Span` replacing `DefId` to make the order deterministic.

This PR is purposed to fix rust-lang/rust#140425, but seemly works on rust-lang/rust#140413 too.

This behavior hasn't added into any test until we have a test suit for the parallel frontend. (See https://github.com/rust-lang/rust/pull/143953)

Related discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Async.20closures.20not.20reproducible.28.23140425.29) https://github.com/rust-lang/rust/pull/144576

Update rust-lang/rust#113349

r? `@oli-obk`
cc `@lqd` `@cramertj` `@matthiaskrgr` `@Zoxc` `@SparrowLii` `@bjorn3` `@cjgillot` `@joshtriplett`
</content>
</entry>
<entry>
<title>Rollup merge of #144870 - Kivooeo:file_prefix-stabilize, r=tgross35</title>
<updated>2025-08-13T05:03:47+00:00</updated>
<author>
<name>Jakub Beránek</name>
<email>berykubik@gmail.com</email>
</author>
<published>2025-08-13T05:03:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ff44871be5b5bd6027c4956eb6d4520e87974c1e'/>
<id>urn:sha1:ff44871be5b5bd6027c4956eb6d4520e87974c1e</id>
<content type='text'>
Stabilize `path_file_prefix` feature

This stabilises `Path::file_prefix`, following the FCP in [tracking issue ](https://github.com/rust-lang/rust/issues/86319)

(FCP ended almost a year ago, so if it's needed for proccess we could rerun it)

Closes: https://github.com/rust-lang/rust/issues/86319
</content>
</entry>
<entry>
<title>Fix pgo tests</title>
<updated>2025-08-13T01:42:46+00:00</updated>
<author>
<name>ywxt</name>
<email>ywxtcwh@gmail.com</email>
</author>
<published>2025-08-13T01:23:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bc8a52161950a59cc1d8f118d1fb10ab5890e84e'/>
<id>urn:sha1:bc8a52161950a59cc1d8f118d1fb10ab5890e84e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix parallel rustc not being reproducible due to unstable sorting of items.</title>
<updated>2025-08-13T00:59:32+00:00</updated>
<author>
<name>ywxt</name>
<email>ywxtcwh@gmail.com</email>
</author>
<published>2025-07-30T09:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=075ce31bd39c68b911edda233f0af3f40113212b'/>
<id>urn:sha1:075ce31bd39c68b911edda233f0af3f40113212b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>clippy: Update for switch to `MacroKinds`</title>
<updated>2025-08-12T16:24:45+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-08-09T08:37:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=33ba4a2f119e23b5d92ba6fac833b532abab82ee'/>
<id>urn:sha1:33ba4a2f119e23b5d92ba6fac833b532abab82ee</id>
<content type='text'>
This updates two clippy lints which had exceptions for `MacroKind::Bang`
macros to extend those exceptions to any macro, now that a macro_rules
macro can be any kind of macro.
</content>
</entry>
<entry>
<title>Auto merge of #144678 - jdonszelmann:no-mangle-extern, r=bjorn3</title>
<updated>2025-08-12T16:20:24+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-08-12T16:20:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8e62bfd311791bfd9dca886abdfbab07ec54d8b4'/>
<id>urn:sha1:8e62bfd311791bfd9dca886abdfbab07ec54d8b4</id>
<content type='text'>
Make no_mangle on foreign items explicit instead of implicit

for a followup PR I'm working on I need some foreign items to mangle. I could add a new attribute: `no_no_mangle` or something silly like that but by explicitly putting `no_mangle` in the codegen fn attrs of foreign items we can default it to `no_mangle` and then easily remove it when we don't want it.

I guess you'd know about this r? `@bjorn3.` Shouldn't be too hard to review :)

Builds on rust-lang/rust#144655 which should merge first.
</content>
</entry>
<entry>
<title>Rollup merge of #145273 - estebank:not-not, r=samueltardieu</title>
<updated>2025-08-12T10:37:57+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-08-12T10:37:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2102eebd56537c6adb4d4e12cfaf7d19c4979b84'/>
<id>urn:sha1:2102eebd56537c6adb4d4e12cfaf7d19c4979b84</id>
<content type='text'>
Account for new `assert!` desugaring in `!condition` suggestion

`rustc` in https://github.com/rust-lang/rust/pull/122661 is going to change the desugaring of `assert!` to be

```rust
match condition {
    true =&gt; {}
    _ =&gt; panic!(),
}
```
which will make the edge-case of `condition` being `impl Not&lt;Output = bool&gt;` while not being `bool` itself no longer a straightforward suggestion, but `!!condition` will coerce the expression to be `bool`, so it can be machine applicable.

Transposing https://github.com/rust-lang/rust-clippy/pull/15453/ to the rustc repo.

r? `````@samueltardieu`````
</content>
</entry>
</feed>
