Skip to content

Avoid literal CURRENT_RUSTC_VERSION string #17815

Open

Description

@Mark-Simulacrum

See

if s.bytes().all(|c| matches!(c, b'0'..=b'9' | b'.')) || matches!(s, "pre 1.29.0" | "CURRENT_RUSTC_VERSION") {

This gets replaced by https://github.com/rust-lang/rust/blob/5c543b0b8c73c7b72bc8284ced4fb22ead15734d/src/tools/replace-version-placeholder/src/main.rs#L25 -- if we can avoid the literal there by e.g. checking a prefix + suffix or similar, that would be good. Otherwise we'll accidentally replace this and probably miss it in PR review eventually.

Activity

  1. Jarcho commented on Sep 29, 2026

    @Jarcho
    Contributor

    Replacing it is "fine" (nothing will break) since this is parsing clippy's source and we don't actually use CURRENT_RUSTC_VERSION yet. The PR to actually use this also fixes the problem.

  2. Mark-Simulacrum commented on Sep 30, 2026

    @Mark-Simulacrum
    MemberAuthor

    Sounds good. I'll skip "fixing" the replaced string on beta then. Thanks!

  3. added
    A-infraArea: CI issues and issues that require full access for GitHub/CI
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-infraArea: CI issues and issues that require full access for GitHub/CI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions