Skip to content

Conversation

@jdonszelmann
Copy link
Contributor

@jdonszelmann jdonszelmann commented Oct 18, 2025

This PR does a couple of things. First of all, I found an ICE that happens when applying #![core::prelude::v1::test] to the crate root. This is caused by the test macro not expanding to an item when --test isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when --test isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that #[test] applied to structs previously would give no errors unless --test is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

Also fixed a smol diagnostics bug with #[bench]'s error messages refering to #[test] accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes #114920

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 18, 2025

noratrieb is not on the review rotation at the moment.
They may take a while to respond.


if !is_bench {
err.with_span_suggestion(attr_sp,
"replace with conditional compilation to make the item only exist when tests are being run",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only give the suggestion of cfg(test) when we're dealing with test attrs

@@ -0,0 +1,48 @@
#![feature(test)]

// test is a built-in macro, not a built-in attribute, but it kind of acts like both.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New test for test attributes. The previous tests simply asserted no errors would be given but that's not true anymore, and I think they should error!

// non-crate-level #[test] attributes seem to be ignored.

#[test]
mod test { mod inner { #![test] }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were weird here anyway, test isn't a built-in attribute but a built-in macro!

@@ -5,8 +5,8 @@ macro_rules! cbor_map {
}

fn main() {
cbor_map! { #[test(test)] 4};
//~^ ERROR removing an expression is not supported in this position
cbor_map! { #[test(test)] 4i32};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to an i32 cause signum wouldn't be valid on just 4

cbor_map! { #[test(test)] 4};
//~^ ERROR removing an expression is not supported in this position
cbor_map! { #[test(test)] 4i32};
//~^ ERROR the `#[test]` attribute may only be used on a non-associated function
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the correct error here, not something about removing expressions. I think noting that the target is wrong is more important.

@@ -0,0 +1,8 @@
// ICE when applying `#![test]` to the crate root,
// though only when specified with a full path. `#![test]` is not enough.
#![core::prelude::v1::test]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests the specific ICE from the PR description

LL | let _ = #[test] 0;
| ^^^^^^^

error: removing an expression is not supported in this position
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test was testing for "empty expressions". this is super niche, can only happen with ast-based attributes (only like 10 in the compiler) and none of the examples in this test should actually remove the expression, they should instead report that the target is wrong. I can't find any other examples of node-removing attributes so I think this test is simply superfluous now.

@jdonszelmann
Copy link
Contributor Author

@bors try
@craterbot check

@craterbot
Copy link
Collaborator

🚨 Error: missing start toolchain

🆘 If you have any trouble with Crater please ask in t-infra on Zulip
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 18, 2025
Fix ICE when applying test macro to crate root
@matthiaskrgr
Copy link
Member

does this fix #114920 ?

@rust-log-analyzer

This comment has been minimized.

@jdonszelmann
Copy link
Contributor Author

yea, that's actually exactly what it fixes. there was a crashtest for it I just notice but the fix is rather trivial in the end

@jdonszelmann
Copy link
Contributor Author

@bors try cancel

@rust-bors
Copy link
Contributor

rust-bors bot commented Oct 18, 2025

Try build cancelled. Cancelled workflows:

@rustbot
Copy link
Collaborator

rustbot commented Oct 18, 2025

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@jdonszelmann
Copy link
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 18, 2025
Fix ICE when applying test macro to crate root
@rust-bors
Copy link
Contributor

rust-bors bot commented Oct 18, 2025

☀️ Try build successful (CI)
Build commit: 73ffebf (73ffebff6f34db7eb167bf9edcf2afa19c3073e9, parent: ab1d2444533d829e2d5cff6634cd3c70de6d7103)

@jdonszelmann
Copy link
Contributor Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-147841 created and queued.
🤖 Automatically detected try build 73ffebf
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 18, 2025
@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 3, 2025
@Urgau
Copy link
Member

Urgau commented Dec 3, 2025

cc @Urgau range diff doesn't seem to work?

As far as I can see the range-diff is right, there aren't changes between the two diffs (previous - current - patch diff - range-diff).

The commits are exactly the same (modulo the ids). I don't see in the new version the requested changes by Waffle.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 3, 2025
…flelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes rust-lang#114920
bors added a commit that referenced this pull request Dec 3, 2025
Rollup of 9 pull requests

Successful merges:

 - #147841 (Fix ICE when applying test macro to crate root)
 - #149501 (CTFE: avoid emitting a hard error on generic normalization failures)
 - #149517 (Implement blessing for tidy alphabetical check)
 - #149521 (Improve `io::Error::downcast`)
 - #149545 (fix the check for which expressions read never type)
 - #149549 (Regression test for system register `ttbr0_el2`)
 - #149579 (Motor OS: fix compile error)
 - #149595 (Tidying up `tests/ui/issues` tests [2/N])
 - #149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`")

r? `@ghost`
`@rustbot` modify labels: rollup
@jdonszelmann
Copy link
Contributor Author

@WaffleLapkin
Copy link
Member

@Urgau I'll also add that "View changes since this review" link redirects to github diff which is affected by the rebase on main.

@Urgau
Copy link
Member

Urgau commented Dec 3, 2025

Okay, I think I know why triagebot links to the wrong pages.

For some reason the GitHub's force-push event thinks you only forced-push until 97d4d21 not until 8f82478, and the webhook we got also has 97d4d21 as the head, not 8f82478.

If we correct for that, the range-diff looks more usual, and contains the changes you made.

As for the "View changes since this review" link, we seemed to think that the oldbase of the PR was 568b117 and the newbase is also 568b117, so we don't go to the range-diff, but I don't know why GitHub thinks the base was 568b117 when the parent of 552d971 is 9b82a4f. Which (surprise, surprise!) would give us the same range-diff.

Seems like something is messed up in GitHub's API/webhook, which makes triagebot links to the wrong thing. I will keep an eye open, in case it happens on other PRs too.

bors added a commit that referenced this pull request Dec 4, 2025
Rollup of 9 pull requests

Successful merges:

 - #147841 (Fix ICE when applying test macro to crate root)
 - #149501 (CTFE: avoid emitting a hard error on generic normalization failures)
 - #149517 (Implement blessing for tidy alphabetical check)
 - #149521 (Improve `io::Error::downcast`)
 - #149545 (fix the check for which expressions read never type)
 - #149549 (Regression test for system register `ttbr0_el2`)
 - #149579 (Motor OS: fix compile error)
 - #149595 (Tidying up `tests/ui/issues` tests [2/N])
 - #149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`")

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 4, 2025
…flelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes rust-lang#114920
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 4, 2025
…flelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes rust-lang#114920
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 4, 2025
…flelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes rust-lang#114920
bors added a commit that referenced this pull request Dec 4, 2025
Rollup of 12 pull requests

Successful merges:

 - #147841 (Fix ICE when applying test macro to crate root)
 - #149147 (Fix unused_assignments false positives from macros)
 - #149183 (Use `TypingMode::PostAnalysis` in `try_evaluate_const`)
 - #149456 (std: don't call `current_os_id` from signal handler)
 - #149501 (CTFE: avoid emitting a hard error on generic normalization failures)
 - #149528 (reword error for invalid range patterns)
 - #149539 (Additional test for uN::{gather,scatter}_bits)
 - #149549 (Regression test for system register `ttbr0_el2`)
 - #149550 (Disable native-lib for x check miri)
 - #149554 (build-manifest: generate MSI and MINGW arrays from rustc)
 - #149557 (c-variadic: bpf and spirv do not support c-variadic definitions)
 - #149569 (Fix mailmap issue)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5019bda into rust-lang:main Dec 4, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Dec 4, 2025
rust-timer added a commit that referenced this pull request Dec 4, 2025
Rollup merge of #147841 - jdonszelmann:test-macro-ice, r=wafflelapkin

Fix ICE when applying test macro to crate root

This PR does a couple of things. First of all, I found [an ICE](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=a733a7f3d223e1a9712e44b571f3e5cf) that happens when applying `#![core::prelude::v1::test]` to the crate root. This is caused by the test macro not expanding to an item when `--test` isn't applied. For the crate root, that means it deletes the crate....

The fix now first does target checking, and only if the target is valid discards the item when `--test` isn't applied. The discarding is, I think, important for perf.

The problem with this PR is that it means that `#[test]` applied to structs previously would give no errors unless `--test` is applied! That sounds like a bug to me, but maybe we should crater run it just in case, since technically that's a breaking change. Errors in such items wouldn't be reported previously.

 Also fixed a smol diagnostics bug with `#[bench]`'s error messages refering to `#[test]` accidentally.

r? noratrieb (since I already explained you a bunch, feel free to re-assign)

Fixes #114920
@Kobzol
Copy link
Member

Kobzol commented Dec 4, 2025

@rust-timer build 9b9e073

For #149631 (comment).

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9b9e073): comparison URL.

Overall result: no relevant changes - BENCHMARK(S) FAILED

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • Job failure

❗ ❗ ❗ ❗ ❗

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: missing data

@rust-timer

This comment has been minimized.

@Kobzol
Copy link
Member

Kobzol commented Dec 4, 2025

@rust-timer build 9b9e073

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9b9e073): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 468.789s -> 468.167s (-0.13%)
Artifact size: 386.75 MiB -> 386.74 MiB (-0.00%)

github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 15, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#147841 (Fix ICE when applying test macro to crate root)
 - rust-lang/rust#149147 (Fix unused_assignments false positives from macros)
 - rust-lang/rust#149183 (Use `TypingMode::PostAnalysis` in `try_evaluate_const`)
 - rust-lang/rust#149456 (std: don't call `current_os_id` from signal handler)
 - rust-lang/rust#149501 (CTFE: avoid emitting a hard error on generic normalization failures)
 - rust-lang/rust#149528 (reword error for invalid range patterns)
 - rust-lang/rust#149539 (Additional test for uN::{gather,scatter}_bits)
 - rust-lang/rust#149549 (Regression test for system register `ttbr0_el2`)
 - rust-lang/rust#149550 (Disable native-lib for x check miri)
 - rust-lang/rust#149554 (build-manifest: generate MSI and MINGW arrays from rustc)
 - rust-lang/rust#149557 (c-variadic: bpf and spirv do not support c-variadic definitions)
 - rust-lang/rust#149569 (Fix mailmap issue)

r? `@ghost`
`@rustbot` modify labels: rollup
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 23, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rust](https://github.com/rust-lang/rust) | minor | `1.92.0` → `1.93.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>rust-lang/rust (rust)</summary>

### [`v1.93.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1930-2026-01-22)

[Compare Source](rust-lang/rust@1.92.0...1.93.0)

\==========================

<a id="1.93.0-Language"></a>

## Language

- [Stabilize several s390x `vector`-related target features and the `is_s390x_feature_detected!` macro](rust-lang/rust#145656)
- [Stabilize declaration of C-style variadic functions for the `system` ABI](rust-lang/rust#145954)
- [Emit error when using some keyword as a `cfg` predicate](rust-lang/rust#146978)
- [Stabilize `asm_cfg`](rust-lang/rust#147736)
- [During const-evaluation, support copying pointers byte-by-byte](rust-lang/rust#148259)
- [LUB coercions now correctly handle function item types, and functions with differing safeties](rust-lang/rust#148602)
- [Allow `const` items that contain mutable references to `static` (which is *very* unsafe, but not *always* UB)](rust-lang/rust#148746)
- [Add warn-by-default `const_item_interior_mutations` lint to warn against calls which mutate interior mutable `const` items](rust-lang/rust#148407)
- [Add warn-by-default `function_casts_as_integer` lint](rust-lang/rust#141470)

<a id="1.93.0-Compiler"></a>

## Compiler

- [Stabilize `-Cjump-tables=bool`](rust-lang/rust#145974). The flag was previously called `-Zno-jump-tables`.

<a id="1.93.0-Platform-Support"></a>

## Platform Support

- [Promote `riscv64a23-unknown-linux-gnu` to Tier 2 (without host tools)](rust-lang/rust#148435)

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

[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.93.0-Libraries"></a>

## Libraries

- [Stop internally using `specialization` on the `Copy` trait as it is unsound in the presence of lifetime dependent `Copy` implementations. This may result in some performance regressions as some standard library APIs may now call `Clone::clone` instead of performing bitwise copies](rust-lang/rust#135634)
- [Allow the global allocator to use thread-local storage and `std::thread::current()`](rust-lang/rust#144465)
- [Make `BTree::append` not update existing keys when appending an entry which already exists](rust-lang/rust#145628)
- [Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe`](rust-lang/rust#145665)

<a id="1.93.0-Stabilized-APIs"></a>

## Stabilized APIs

- [`<[MaybeUninit<T>]>::assume_init_drop`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_drop)
- [`<[MaybeUninit<T>]>::assume_init_ref`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_ref)
- [`<[MaybeUninit<T>]>::assume_init_mut`](https://doc.rust-lang.org/stable/core/primitive.slice.html#method.assume_init_mut)
- [`<[MaybeUninit<T>]>::write_copy_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_copy_of_slice)
- [`<[MaybeUninit<T>]>::write_clone_of_slice`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.write_clone_of_slice)
- [`String::into_raw_parts`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_raw_parts)
- [`Vec::into_raw_parts`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts)
- [`<iN>::unchecked_neg`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_neg)
- [`<iN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shl)
- [`<iN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.isize.html#method.unchecked_shr)
- [`<uN>::unchecked_shl`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shl)
- [`<uN>::unchecked_shr`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.unchecked_shr)
- [`<[T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_array)
- [`<[T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_array)
- [`<*const [T]>::as_array`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_array)
- [`<*mut [T]>::as_array_mut`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_array)
- [`VecDeque::pop_front_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_front_if)
- [`VecDeque::pop_back_if`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.pop_back_if)
- [`Duration::from_nanos_u128`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_nanos_u128)
- [`char::MAX_LEN_UTF8`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF8)
- [`char::MAX_LEN_UTF16`](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.MAX_LEN_UTF16)
- [`std::fmt::from_fn`](https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html)
- [`std::fmt::FromFn`](https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html)

<a id="1.93.0-Cargo"></a>

## Cargo

- [Enable CARGO\_CFG\_DEBUG\_ASSERTIONS in build scripts based on profile](rust-lang/cargo#16160)
- [In `cargo tree`, support long forms for `--format` variables](rust-lang/cargo#16204)
- [Add `--workspace` to `cargo clean`](rust-lang/cargo#16263)

<a id="1.93.0-Rustdoc"></a>

## Rustdoc

- [Remove `#![doc(document_private_items)]`](rust-lang/rust#146495)
- [Include attribute and derive macros in search filters for "macros"](rust-lang/rust#148176)
- [Include extern crates in search filters for `import`](rust-lang/rust#148301)
- [Validate usage of crate-level doc attributes](rust-lang/rust#149197).  This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`.

<a id="1.93.0-Compatibility-Notes"></a>

## Compatibility Notes

- [Introduce `pin_v2` into the builtin attributes namespace](rust-lang/rust#139751)
- [Update bundled musl to 1.2.5](rust-lang/rust#142682)
- [On Emscripten, the unwinding ABI used when compiling with `panic=unwind` was changed from the JS exception handling ABI to the wasm exception handling ABI.](rust-lang/rust#147224) If linking C/C++ object files with Rust objects, `-fwasm-exceptions` must be passed to the linker now. On nightly Rust, it is possible to get the old behavior with `-Zwasm-emscripten-eh=false -Zbuild-std`, but it will be removed in a future release.
- The `#[test]` attribute, used to define tests, was previously ignored in various places where it had no meaning (e.g on trait methods or types). Putting the `#[test]` attribute in these places is no longer ignored, and will now result in an error; this may also result in errors when generating rustdoc. [Error when `test` attribute is applied to structs](rust-lang/rust#147841)
- Cargo now sets the `CARGO_CFG_DEBUG_ASSERTIONS` environment variable in more situations. This will cause crates depending on `static-init` versions 1.0.1 to 1.0.3 to fail compilation with "failed to resolve: use of unresolved module or unlinked crate `parking_lot`". See [the linked issue](rust-lang/rust#150646 (comment)) for details.
- [User written types in the `offset_of!` macro are now checked to be well formed.](rust-lang/rust#150465)
- `cargo publish` no longer emits `.crate` files as a final artifact for user access when the `build.build-dir` config is unset
- [Upgrade the `deref_nullptr` lint from warn-by-default to deny-by-default](rust-lang/rust#148122)
- [Add future-incompatibility warning for `...` function parameters without a pattern outside of `extern` blocks](rust-lang/rust#143619)
- [Introduce future-compatibility warning for `repr(C)` enums whose discriminant values do not fit into a `c_int` or `c_uint`](rust-lang/rust#147017)
- [Introduce future-compatibility warning against ignoring `repr(C)` types as part of `repr(transparent)`](rust-lang/rust#147185)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44OC4yIiwidXBkYXRlZEluVmVyIjoiNDIuODguMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
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. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: expected exactly one crate