[前][次][番号順一覧][スレッド一覧]

ruby-changes:73176

From: Maxime <ko1@a...>
Date: Tue, 30 Aug 2022 00:58:00 +0900 (JST)
Subject: [ruby-changes:73176] 0551115912 (master): Add #[must_use] annotations to asm instructions

https://git.ruby-lang.org/ruby.git/commit/?id=0551115912

From 0551115912fd6682187dd501275096fdb7570084 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Thu, 7 Jul 2022 16:39:39 -0400
Subject: Add #[must_use] annotations to asm instructions

---
 yjit/src/backend/ir.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs
index 2d68936db1..c9e75df01a 100644
--- a/yjit/src/backend/ir.rs
+++ b/yjit/src/backend/ir.rs
@@ -804,6 +804,7 @@ macro_rules! def_push_1_opnd { https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/ir.rs#L804
     ($op_name:ident, $opcode:expr) => {
         impl Assembler
         {
+            #[must_use]
             pub fn $op_name(&mut self, opnd0: Opnd) -> Opnd
             {
                 self.push_insn($opcode, vec![opnd0], None)
@@ -828,6 +829,7 @@ macro_rules! def_push_2_opnd { https://github.com/ruby/ruby/blob/trunk/yjit/src/backend/ir.rs#L829
     ($op_name:ident, $opcode:expr) => {
         impl Assembler
         {
+            #[must_use]
             pub fn $op_name(&mut self, opnd0: Opnd, opnd1: Opnd) -> Opnd
             {
                 self.push_insn($opcode, vec![opnd0, opnd1], None)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]