Skip to content

Commit

Permalink
manually bless an aarch64 test
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Feb 10, 2024
1 parent 6a5a7a1 commit ea7654f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions tests/ui/asm/aarch64/type-check-4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const fn const_bar<T>(x: T) -> T {
x
}
global_asm!("{}", const S);
//~^ ERROR constants cannot refer to statics
//~^ ERROR referencing statics
global_asm!("{}", const const_foo(0));
global_asm!("{}", const const_foo(S));
//~^ ERROR constants cannot refer to statics
//~^ ERROR referencing statics
global_asm!("{}", const const_bar(0));
global_asm!("{}", const const_bar(S));
//~^ ERROR constants cannot refer to statics
//~^ ERROR referencing statics
26 changes: 19 additions & 7 deletions tests/ui/asm/aarch64/type-check-4.stderr
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
error[E0013]: constants cannot refer to statics
error[E0658]: referencing statics in constants is unstable
--> $DIR/type-check-4.rs:25:25
|
LL | global_asm!("{}", const S);
| ^
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
= note: see issue #119618 <https://github.com/rust-lang/rust/issues/119618> for more information
= help: add `#![feature(const_refs_to_static)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
= help: to fix this, the value can be extracted to a `const` and then used.

error[E0013]: constants cannot refer to statics
error[E0658]: referencing statics in constants is unstable
--> $DIR/type-check-4.rs:28:35
|
LL | global_asm!("{}", const const_foo(S));
| ^
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
= note: see issue #119618 <https://github.com/rust-lang/rust/issues/119618> for more information
= help: add `#![feature(const_refs_to_static)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
= help: to fix this, the value can be extracted to a `const` and then used.

error[E0013]: constants cannot refer to statics
error[E0658]: referencing statics in constants is unstable
--> $DIR/type-check-4.rs:31:35
|
LL | global_asm!("{}", const const_bar(S));
| ^
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
= note: see issue #119618 <https://github.com/rust-lang/rust/issues/119618> for more information
= help: add `#![feature(const_refs_to_static)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: `static` and `const` variables can refer to other `const` variables. A `const` variable, however, cannot refer to a `static` variable.
= help: to fix this, the value can be extracted to a `const` and then used.

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0013`.
For more information about this error, try `rustc --explain E0658`.

0 comments on commit ea7654f

Please sign in to comment.