Closed as not planned
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
- https://crater-reports.s3.amazonaws.com/beta-rustdoc-1.88-1/beta-2025-05-26/reg/safe-proc-macro2-1.0.94/log.txt
- and many others, there are just thousands and thousands of occurances of this in the beta rustdoc crater run :thonk:
[INFO] [stdout] error[E0412]: cannot find type `SourceFile` in crate `proc_macro`
[INFO] [stdout] --> src/wrapper.rs:366:26
[INFO] [stdout] |
[INFO] [stdout] 366 | Compiler(proc_macro::SourceFile),
[INFO] [stdout] | ^^^^^^^^^^ not found in `proc_macro`
[INFO] [stdout] |
[INFO] [stdout] help: consider importing one of these structs
[INFO] [stdout] |
[INFO] [stdout] 1 + use crate::SourceFile;
[INFO] [stdout] |
[INFO] [stdout] 1 + use crate::fallback::SourceFile;
[INFO] [stdout] |
[INFO] [stdout] help: if you import `SourceFile`, refer to it directly
[INFO] [stdout] |
[INFO] [stdout] 366 - Compiler(proc_macro::SourceFile),
[INFO] [stdout] 366 + Compiler(SourceFile),
[INFO] [stdout] |
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
bjorn3 commentedon Jun 12, 2025
This is probably just proc-macro2 detecting that the rustc supports unstable features at all and then assumes that all unstable features it thinks exist haven't changed since it was released (or maybe in this case do already exist in the rustc version it gets compiled with).
Nemo157 commentedon Jun 13, 2025
proc-macro2actually compiles a probe file to decide whether to enable nightly features. So it seems there's something a little weird going on to make that pass on beta.Nemo157 commentedon Jun 13, 2025
It seems that nightly features are enabled in that run, so this is just the lack of dtolnay/proc-macro2#497 from 1.0.95 updating the nightly APIs that proc-macro2 uses.
bjorn3 commentedon Jun 13, 2025
That probe file didn't reference
SourceFileeven before dtolnay/proc-macro2#497.Nemo157 commentedon Jun 13, 2025
Yes, the probe file was incorrect in what API it used which is why 1.0.94 is broken on nightly/RUSTC_BOOTSTRAP, but it at least should always fail to compile on any stable compiler since it uses
#![feature].0xcoinymous commentedon Jul 26, 2025
The solution I found is to force Cargo to update to compatible versions of
proc-macro2,syn, etc.so first run this:
and then try rebuilding: