Skip to content

Add a way for the test suite to test the output of a stable rustc #123404

Closed
@estebank

Description

@estebank

Right now ui tests only target the output of the currently built rustc. As far as I can tell, there's no -Z flag to tell rustc "act as if you were a stable release". This means that when we customize the diagnostic output based on release channel, we cannot test what stable users will actually see. An example of this is this (as of now unmerged) change that on stable refers to unsized locals and unsized fn arguments with the same note telling the user that's not allowed, while on nightly it tells the user which feature flag is gating that being allowed, without the note stating it's not allowed. That kind of behavior is replicated in multiple diagnostics involving nightly features already. It's the same "problem" we'd have with editions if we didn't already have a stable flag to specify them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)A-testsuiteArea: The testsuite used to check the correctness of rustcC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-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