Skip to content

From<proc_macro::Span> is missing for proc_macro2::Span when DOCS_RS=1 - #501

Closed
wtdcode wants to merge 2 commits into
dtolnay:masterfrom
wtdcode:impl-proc-macro-span
Closed

From<proc_macro::Span> is missing for proc_macro2::Span when DOCS_RS=1#501
wtdcode wants to merge 2 commits into
dtolnay:masterfrom
wtdcode:impl-proc-macro-span

Conversation

@wtdcode

@wtdcode wtdcode commented May 17, 2025

Copy link
Copy Markdown

Hello, I narrowed down this error when debugging our CI: https://github.com/AFLplusplus/LibAFL/actions/runs/15085325118/job/42407219490#step:5:180

Generally, as illustrated in GnomedDev/proc-macro-error-2#12 (comment) , when DOCS_RS=1, proc-macro2 will miss the implementation From<proc_macro::Span> for proc_macro2::Span (existing in wrapper.rs), causing issues to downstreams.

Note a minimum reproduction was also attached in the issue above.

This PR fixes it by adding the implementation when DOCS_RS=1 and thus wrap_proc_macro is not defined. I'm not 100% confident this is the correct place for the fix to go so any inputs are highly welcome =).

@wtdcode

wtdcode commented May 17, 2025

Copy link
Copy Markdown
Author

fatal error: cross-interpreting doctests is not currently supported by Miri.

CI failure seems not relevant to my changes.

wtdcode added a commit to AFLplusplus/LibAFL that referenced this pull request May 17, 2025
@wtdcode wtdcode mentioned this pull request May 17, 2025
1 task
@wtdcode
wtdcode force-pushed the impl-proc-macro-span branch from d8ca892 to 1dbb2a7 Compare May 17, 2025 16:52
@wtdcode

wtdcode commented May 17, 2025

Copy link
Copy Markdown
Author

cargo +nightly miri test passes on my local machine, is it a nightly issue?

wtdcode added a commit to AFLplusplus/LibAFL that referenced this pull request May 18, 2025
* fix ci

track: dtolnay/proc-macro2#501

* format toml

* fix typo

* Use nightly for libafl_frida

* Install nightly for splitter

* Use dtolnay/rust-toolchain@nightly

* install ca-certificates
@dtolnay

dtolnay commented Oct 23, 2025

Copy link
Copy Markdown
Owner

Since #511 proc-macro2's build no longer looks at $DOCS_RS.

@dtolnay dtolnay closed this Oct 23, 2025
rmalmain pushed a commit to LibAFLminusminus/LibAFLminusminus that referenced this pull request Apr 27, 2026
* fix ci

track: dtolnay/proc-macro2#501

* format toml

* fix typo

* Use nightly for libafl_frida

* Install nightly for splitter

* Use dtolnay/rust-toolchain@nightly

* install ca-certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants