Skip to content

Accidental stabilization of z template modifiers #165055

Closed

Description

@traviscross

The following program is rejected on stable but accepted on nightly and on beta; it will go out with Rust 1.100 as things are.

use core::arch::asm;

#[allow(unused)]
#[target_feature(enable = "sve")]
unsafe fn through_z(x: f64) -> f64 {
    let y: f64;
    unsafe { asm!("mov {1:z}.d, {0:z}.d", in(vreg) x, out(vreg) y) };
    y
}

This changed, I believe, in #158312. My read of the PR, given what was added to the unstable book there, is that this was intended to be gated.

H/t to @DanielEScherzer. This was found while looking into his question in #164665 (comment).

@Amanieu: What's the situation here?

Activity

  1. added
    A-inline-assembly
    T-lang
    T-compiler
    I-lang-nominated
    I-lang-radar
    P-lang-drag-0
    on Oct 27, 2026
  2. added
    needs-triage
    on Oct 27, 2026
  3. added
    A-stability
    regression-from-stable-to-beta
    and removed
    needs-triage
    on Oct 27, 2026
  4. self-assigned this
    on Oct 28, 2026
  5. lqd commented on Oct 28, 2026

    @lqd
    Member

    #165083 will fix this issue (after a beta backport)

  6. removed
    I-lang-nominated
    P-lang-drag-0
    on Oct 28, 2026
  7. added a commit that references this issue on Oct 28, 2026
  8. Amanieu commented on Oct 28, 2026

    @Amanieu
    Member

    While looking into this I noticed in https://doc.rust-lang.org/nightly/unstable-book/language-features/asm-experimental-reg.html that we also have template modifiers for some LoongArch registers which aren't gated either. Those have already hit stable though.

  9. added 2 commits that reference this issue on Oct 29, 2026
  10. added a commit that references this issue on Oct 29, 2026
  11. theemathas commented on Nov 3, 2026

    @theemathas
    Contributor

    Backported in #165368.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-inline-assemblyA-stabilityI-lang-radarT-compilerT-langregression-from-stable-to-beta

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions