From 4b7a87de1094522c5c6e5a7bda04e0e0b281e049 Mon Sep 17 00:00:00 2001 From: Folkert Date: Wed, 24 Jul 2024 15:27:56 +0200 Subject: use an allow list for allowed asm options in naked functions --- tests/ui/asm/naked-functions.rs | 2 +- tests/ui/asm/naked-functions.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs index 1619ebfcf39..6b2d2aea238 100644 --- a/tests/ui/asm/naked-functions.rs +++ b/tests/ui/asm/naked-functions.rs @@ -111,7 +111,7 @@ unsafe extern "C" fn invalid_options() { unsafe extern "C" fn invalid_options_continued() { asm!("", options(readonly, nostack), options(pure)); //~^ ERROR asm with the `pure` option must have at least one output - //~| ERROR asm options unsupported in naked functions: `nostack`, `pure`, `readonly` + //~| ERROR asm options unsupported in naked functions: `pure`, `readonly`, `nostack` //~| ERROR asm in naked functions must use `noreturn` option } diff --git a/tests/ui/asm/naked-functions.stderr b/tests/ui/asm/naked-functions.stderr index 77bc80a101f..4dd9e29bdc6 100644 --- a/tests/ui/asm/naked-functions.stderr +++ b/tests/ui/asm/naked-functions.stderr @@ -212,7 +212,7 @@ error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_fl LL | asm!("", options(nomem, preserves_flags, noreturn)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly` +error[E0787]: asm options unsupported in naked functions: `pure`, `readonly`, `nostack` --> $DIR/naked-functions.rs:112:5 | LL | asm!("", options(readonly, nostack), options(pure)); -- cgit 1.4.1-3-g733a5