From 9db552f25af29bd550a2bc0be2f2825e5226c7a4 Mon Sep 17 00:00:00 2001 From: Alex Soderman <5639572+asoderman@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:22:09 -0400 Subject: [PATCH] Allow passing index as :ident in set_general_handler macro --- src/structures/idt.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/structures/idt.rs b/src/structures/idt.rs index 251346cca..232c41e85 100644 --- a/src/structures/idt.rs +++ b/src/structures/idt.rs @@ -1170,6 +1170,9 @@ macro_rules! set_general_handler { ($idt:expr, $handler:ident, $idx:literal) => { $crate::set_general_handler!($idt, $handler, $idx..=$idx); }; + ($idt:expr, $handler:ident, $idx:ident) => { + $crate::set_general_handler!($idt, $handler, $idx..=$idx); + }; ($idt:expr, $handler:ident, $range:expr) => {{ /// This constant is used to avoid spamming the same compilation error ~200 times /// when the handler's signature is wrong.