Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions tests/ui/asm/aarch64/type-check-4.rs

This file was deleted.

21 changes: 0 additions & 21 deletions tests/ui/asm/aarch64/type-check-4.stderr

This file was deleted.

11 changes: 11 additions & 0 deletions tests/ui/asm/non-const.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ needs-asm-support

use std::arch::global_asm;

fn main() {}

// Constants must be... constant
fn non_const_fn(x: i32) -> i32 { x }

global_asm!("/* {} */", const non_const_fn(0));
//~^ERROR: cannot call non-const fn
11 changes: 11 additions & 0 deletions tests/ui/asm/non-const.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0015]: cannot call non-const fn `non_const_fn` in constants
--> $DIR/non-const.rs:10:31
|
LL | global_asm!("/* {} */", const non_const_fn(0));
| ^^^^^^^^^^^^^^^
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0015`.
27 changes: 0 additions & 27 deletions tests/ui/asm/x86_64/type-check-4.rs

This file was deleted.

21 changes: 0 additions & 21 deletions tests/ui/asm/x86_64/type-check-4.stderr

This file was deleted.

Loading