Skip to content

Conversation

@JaclynCodes
Copy link

@JaclynCodes JaclynCodes commented Nov 17, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 21 commits November 6, 2025 08:02
…imulacrum

use funnel shift as fallback impl for rotating shifts

That lets us remove this gnarly implementation from Miri and const-eval.

However, `rotate_left`/`rotate_right` are stable as const fn, so to do this we have to `rustc_allow_const_fn_unstable` a bunch of const trait stuff. Is that a bad idea? Cc `@oli-obk` `@fee1-dead`
add larger test for `proc_macro` `FromStr` implementations

Currently, there are only few tests that check the output of `TokenStream::from_str` and `Literal::from_str` (which is somewhat understandable as the rustc implementation just delegates these calls to the parser). In preparation for both the standalone backend (rust-lang#130856) which will probably need to reimplement this logic as well as for removing panics from these functions (rust-lang#58736), this PR adds a test which shows the various messy ways of how these functions report errors and the return values for successful parses.
Followup PRs such as rust-lang#147859 will change more and more of these "diagnostic + error"s into `LexErrors`.

The test structure with the extra module is used to allow reusing it later easily for the standalone backend.
…r=scottmcm

Constify `ManuallyDrop::take`

Feature: `const_manually_drop_take`
Tracking issue: rust-lang#148773

This PR constifies `ManuallyDrop::take`.
Error if an autodiff user does not set lto=fat

Based on your feedback, I started to provide a nice error message for a lack of `lto=fat`, instead of us forcing it.

In a next step, we should replace  `RUSTFLAGS="-Zautodiff=Enable"` with another Cargo.toml setting, as discussed here: rust-lang#147487 (comment)

As another improvement, we should also figure out why rlib builds do not properly obey the fat=lto setting.

````@bjorn3````
add note to `lines` docs about empty str behavior

This pull request adds a short note to the documentation for `str::lines` that describes the behavior of the resulting iterator when called on an empty string. I tripped over this a few days ago because I thought (incorrectly) that the iterator would return a single line with an empty string. I don't doubt that the actual behavior (return no lines) is the correct behavior, but in the absence of explicit documentation describing it, I came to the wrong conclusion about it and maybe others will too. If this is so obvious as to be not worth including, I'm happy to withdraw the pull request! Thanks for taking a look.
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
…ouxu

triagebot: remove jsha from notifications for rustdoc HTML

See rust-lang/team#2083 - I'm moving to alumni status for rustdoc and no longer need these notifications.
Copilot AI review requested due to automatic review settings November 17, 2025 04:41
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2025

Error: Label rollup can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

Copilot finished reviewing on behalf of JaclynCodes November 17, 2025 04:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This is a rollup PR that merges 8 separate pull requests into the main Rust repository, covering various improvements and fixes across testing, intrinsics, documentation, and the autodiff feature.

  • Implements funnel shift as fallback for rotation operations
  • Adds comprehensive test coverage for proc_macro FromStr implementations
  • Makes ManuallyDrop::take and mem::take const functions
  • Enforces LTO=fat requirement for autodiff usage with proper error messages
  • Improves documentation for str::lines and rotation methods
  • Fixes race condition in compiletest file deletion

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
triagebot.toml Removes @jsha from HTML/CSS/JS change notifications
tests/ui/proc-macro/* Adds new comprehensive test files for proc_macro parsing behavior
tests/ui/autodiff/no_lto_flag.rs Adds test to verify autodiff requires lto=fat configuration
tests/ui/autodiff/no_lto_flag.no_lto.stderr Expected error output for autodiff without fat LTO
tests/codegen-llvm/intrinsics/rotate_left.rs Updates test expectations with noundef and optimization flags
src/tools/compiletest/src/runtest.rs Fixes race condition by handling NotFound errors in file deletion
library/core/src/str/mod.rs Adds documentation clarifying empty string behavior for lines()
library/core/src/num/uint_macros.rs Adds rotation documentation and rustc attributes for const trait impl
library/core/src/num/int_macros.rs Adds rotation documentation for signed integers
library/core/src/mem/mod.rs Makes mem::take const with const Default trait bound
library/core/src/mem/manually_drop.rs Makes ManuallyDrop::take const
library/core/src/intrinsics/mod.rs Implements rotate_left/right using funnel shift fallback
compiler/rustc_session/src/session.rs Removes automatic fat-lto setting for autodiff
compiler/rustc_const_eval/src/interpret/intrinsics.rs Removes rotate_left/right interpreter implementation (now uses fallback)
compiler/rustc_codegen_llvm/src/intrinsic.rs Adds LTO check for autodiff and simplifies funnel shift handling
compiler/rustc_codegen_llvm/src/errors.rs Adds AutoDiffWithoutLto error struct
compiler/rustc_codegen_llvm/messages.ftl Adds error message for autodiff without LTO

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

View changes since this review

Copy link
Author

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

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

JaclynCodes and others added 2 commits November 16, 2025 23:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Author

@JaclynCodes JaclynCodes left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants