diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-08-29 10:07:19 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:08 +0100 |
commit | f4f546c9881c47923c7d37e8cf7a9bc35f37489c (patch) | |
tree | ab5de44f8cfce17401ca0d17ce226e14b9d6073c /gcc/testsuite | |
parent | 4d366e3da3d3f46aa7c7545bb127bb91c7049666 (diff) | |
download | gcc-f4f546c9881c47923c7d37e8cf7a9bc35f37489c.zip gcc-f4f546c9881c47923c7d37e8cf7a9bc35f37489c.tar.gz gcc-f4f546c9881c47923c7d37e8cf7a9bc35f37489c.tar.bz2 |
gccrs: Rehaul, Apply code review from Arthur
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::visit):
Change API, public/private, comments, formatting from code
review
(CompileAsm::asm_build_expr): Likewise.
(CompileAsm::tree_codegen_asm): Likewise.
* backend/rust-compile-asm.h (class CompileAsm): Likewise.
* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
* expand/rust-macro-builtins-asm.cc (strip_double_quotes): Likewise.
(parse_options): Likewise.
(parse_asm_arg): Likewise.
(expand_inline_asm_strings): Likewise.
(parse_asm): Likewise.
* expand/rust-macro-builtins-asm.h (strip_double_quotes): Likewise.
(expand_inline_asm_strings): Likewise.
(expand_inline_asm_string): Likewise.
* hir/tree/rust-hir-expr.h: Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_typecheck.rs: Change comments
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/rust/compile/inline_asm_typecheck.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/testsuite/rust/compile/inline_asm_typecheck.rs b/gcc/testsuite/rust/compile/inline_asm_typecheck.rs index 22b7fb1..b2daefc 100644 --- a/gcc/testsuite/rust/compile/inline_asm_typecheck.rs +++ b/gcc/testsuite/rust/compile/inline_asm_typecheck.rs @@ -12,10 +12,9 @@ fn main() { // This demonstrates that asm!'s is inferred with a unit type is parsed correctly. let _ = asm!("nop"); - // This errors out per rust spec - // The asm! block never returns, and its return type is defined as ! (never). - // Behavior is undefined if execution falls through past the end of the asm code. - // A noreturn asm block behaves just like a function which doesn't return; notably, local variables in scope are not dropped before it is invoked. + // The asm! block never returns, and its return type is defined as ! (never). + // Behavior is undefined if execution falls through past the end of the asm code. + // A noreturn asm block behaves just like a function which doesn't return; notably, local variables in scope are not dropped before it is invoked. let _ = asm!("nop", options(noreturn)); } } |