Skip to content

Fix attribute target checking for macro calls #145788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Aug 23, 2025

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Proper fix for macro call target Fix macro calls\ Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix macro calls\ Fix target checking for macro calls Aug 23, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix target checking for macro calls Fix attribute target checking for macro calls Aug 23, 2025
@JonathanBrouwer
Copy link
Contributor Author

@rustbot author
This solution can be improved after #137729 is merged so let's wait on that

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@JonathanBrouwer JonathanBrouwer force-pushed the proper-fix-for-macro-call-target branch from 9dd2d71 to e8f33c2 Compare August 24, 2025 12:29
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2025

This PR was rebased onto a different master 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.

@JonathanBrouwer
Copy link
Contributor Author

@rustbot ready
@jdonszelmann This now uses early lints :)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 24, 2025
@jdonszelmann
Copy link
Contributor

awesome, @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 24, 2025

📌 Commit e8f33c2 has been approved by jdonszelmann

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2025
@JonathanBrouwer JonathanBrouwer force-pushed the proper-fix-for-macro-call-target branch from e8f33c2 to fe81a79 Compare August 24, 2025 12:55
@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Aug 24, 2025

@jdonszelmann Whoops my bad I just realized this will fail PR CI, forgot to bless my test after fixing tidy :P Should be good now

@jdonszelmann
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 24, 2025

📌 Commit fe81a79 has been approved by jdonszelmann

It is now in the queue for this repository.

bors added a commit that referenced this pull request Aug 24, 2025
…get, r=jdonszelmann

Fix attribute target checking for macro calls

Fixes #145779

r? `@jdonszelmann`
@bors
Copy link
Collaborator

bors commented Aug 24, 2025

⌛ Testing commit fe81a79 with merge d99c879...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [mir-opt] tests\mir-opt\copy-prop\dead_stores_better.rs stdout ----

error: compilation failed!
status: exit code: 0xc00000fd
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;D:\a\rust\rust\build\x86_64-pc-windows-gnu\bootstrap-tools\x86_64-pc-windows-gnu\release\deps;D:\a\rust\rust\ninja;D:\a\rust\rust\mingw64\bin;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\7.0\bin;C:\vcpkg;C:\tools\zstd;C:\hostedtoolcache\windows\stack\3.7.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.24.6\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.3.9\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.16-8\x64\bin;C:\Program Files\ImageMagick-7.1.2-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.11\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\mongosh;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\mir-opt\\copy-prop\\dead_stores_better.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--target=x86_64-pc-windows-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "-Copt-level=1" "-Zdump-mir=CopyProp" "-Zvalidate-mir" "-Zlint-mir" "-Zdump-mir-exclude-pass-number" "-Zmir-include-spans=false" "--crate-type=rlib" "-Zmir-opt-level=0" "-Zmir-enable-passes=+CopyProp" "-Zdump-mir-dir=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\mir-opt\\copy-prop\\dead_stores_better" "--emit" "mir" "-C" "prefer-dynamic" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\mir-opt\\copy-prop\\dead_stores_better" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Zmir-enable-passes=+DeadStoreElimination"
stdout: none
--- stderr -------------------------------
warning: value assigned to `a` is never read
##[warning]  --> D:\a\rust\rust\tests\mir-opt\copy-prop\dead_stores_better.rs:16:5
   |
---

Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Build completed unsuccessfully in 1:46:44
make: *** [Makefile:123: ci-mingw-x] Error 1
  local time: Sun Aug 24 16:25:44 CUT 2025
  network time: Sun, 24 Aug 2025 16:25:45 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Aug 24, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 24, 2025
@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Aug 24, 2025

^ A test in the mir-opt test suite failed due to a stack overflow in the compiler.
I cannot reproduce this locally (though I'm on linux and the test failed on windows) and the test uses no attributes so I think this is spurious?
(A stacktrace would be nice, but I guess that's not available? :c)

@jdonszelmann Maybe lets do a try run for the failed job? Or just retry if you feel confident

@jdonszelmann
Copy link
Contributor

@bors2 try jobs=test-various

rust-bors bot added a commit that referenced this pull request Aug 24, 2025
…get, r=<try>

Fix attribute target checking for macro calls

try-job: test-various
@rust-bors
Copy link

rust-bors bot commented Aug 24, 2025

⌛ Trying commit fe81a79 with merge b87bc2b

To cancel the try build, run the command @bors try cancel.

@jdonszelmann
Copy link
Contributor

(I assumed various was a collection of several tests, but I think that assumption was wrong? I'll also queue the specific one to make sure)

@bors2 try x86_64-mingw-1

@rust-bors
Copy link

rust-bors bot commented Aug 24, 2025

Unknown argument "x86_64-mingw-1". Run @bors2 help to see available commands.

@jdonszelmann
Copy link
Contributor

@bors2 try jobs=x86_64-mingw-1

@rust-bors
Copy link

rust-bors bot commented Aug 24, 2025

⌛ Trying commit fe81a79 with merge 521d3a1

(The previously running try build was automatically cancelled.)

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Aug 24, 2025
…get, r=<try>

Fix attribute target checking for macro calls

try-job: x86_64-mingw-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

itertools 0.9: error: '#[inline]' attribute cannot be used on macro calls
5 participants