Skip to content

Rustdoc Json Test Suite: Avoid using #![no_core] #117487

Closed
@aDotInTheVoid

Description

@aDotInTheVoid

Many tests in tests/rustdoc-json use #![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 core and rustc. 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] in tests/rustdoc-json. Some of them will be unavoidable if we're trying to test core specific behaviour (eg inherent impls on primitives), but we should limit #![no_core] to cases where it's strictly nessessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-rustdoc-jsonArea: Rustdoc JSON backendA-testsuiteArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions