-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: EasyP-lowPriority: LowPriority: LowS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Z-doctest-xcompileNightly: doctest-xcompileNightly: doctest-xcompile
Description
Main tracking issue: #7040
Problem
I just spent a lot longer than I'm willing to admit trying to work out why my doctests were not running. After working out I'd done everything correctly I finally tried --verbose
and found the warning about cross-compilation not being supported.
cargo test
completes successfully and I've not even known that the doctests have been skipped for months! Why is this warning hidden behind the verbose flag?
Steps
Create a src file with failing doc tests:
lib.rs
/// ```
/// panic("something')
/// ```
pub fn my_function() { }
Ensure you're building for another target. For me, this was on an M1 mac with the following .cargo/config
to make this a cross platform build:
[build]
target = "x86_64-apple-darwin"
Run cargo test --doc
Results in no output after the build output.
Version
cargo 1.69.0
pali6
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: EasyP-lowPriority: LowPriority: LowS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Z-doctest-xcompileNightly: doctest-xcompileNightly: doctest-xcompile