Cargo apparently does not forward opt level to doctest #12877
Labels
A-doctests
Area: rustdoc --test
C-bug
Category: bug
S-triage
Status: This issue is waiting on initial triage.
Problem
When running cargo doctest with a release profile with lto = "fat" I encountered the following miscompile rust-lang/rust#116941
as advised here rust-lang/rust#116941 (comment)
I am opening this issue to ask whether the potential lack of forwarding of opt levels (as identified in the comment) is a conscious decision ?
As a user of doctests I would expect the cargo profile to apply to the doctests being compiled and at the moment it seems some parts of it are not forwarded to doctests.
Steps
From my understanding from the linked issue above any doctest does not get the proper opt levels from cargo at the moment
Possible Solution(s)
I'm guessing that if the opt levels (and other flags) are not forwarded to the doctests that they perhaps ought to be to match a simple binary compilation that one would trigger via
cargo build
?Notes
No response
Version
The text was updated successfully, but these errors were encountered: