Skip to content

Tracking Issue for minicore (core prelude stubs test auxiliary) #131485

Closed
@jieyouxu

Description

@jieyouxu

Context

We have a bunch of #![no_core] ui/codegen/assembly tests that roll their own core prelude stubs because they need to build (but not run) on a cross-compiled target. But this means:

  • A bunch of duplicated implementations of core prelude stubs scattered in different tests.
  • A heavy burden on a contributor of possibly having to update many tests if a new required lang item wants to be added.
  • Prelude stubs can obfuscate the intent of the test (more things that the reader has to read and mentally filter out).

Instead of continuing to add more copies of core prelude stubs, let's centralize such core prelude stubs into a shared test auxiliary called minicore. minicore is for core prelude stubs specifically. std prelude which can include liballoc items and such is beyond the scope of minicore, because core is usable by more tests. This does not preclude adding another ministd or minialloc for stubs of std/liballoc respectively.

See #130375 for more discussions.

Steps

Unresolved questions

  • What do we do with existing #![no_core] tests that could benefit from minicore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)A-test-infra-minicoreArea: `minicore` test auxiliary and `//@ add-core-stubs`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler 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