-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Rustdoc Json Test Suite: Avoid using #![no_core] #117487
Copy link
Copy link
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Many tests in
tests/rustdoc-jsonuse#![feature(no_core)]#![no_core]. This significantly reduces the size of the generates JSON, and makes the tests easier to write.However it also means the tests now rely on the unstable (and undocumented) contract between
coreandrustc. This means that unreleated rustc changes can cause these tests to fail, as they usually only contain the subset of lang-items needed to make the tests pass.We don't want rustdoc-json tests to create unnessessary work for people working on rustc, who may not be framiliar with how the tests work, and deffinatly don't want to be interupted by our flakey tests.
Eg: https://github.com/rust-lang/rust/pull/117213/files#diff-9e25fc2f875153412739ef3cdf1267fc82c6f2743f0d7ee8dba65671d24cb3caR4-R7
Therefor, we should remove usages of
#![no_core]intests/rustdoc-json. Some of them will be unavoidable if we're trying to testcorespecific behaviour (eg inherent impls on primitives), but we should limit#![no_core]to cases where it's strictly nessessary.