From d4c5005d8aab4db389902fa6af70168e65814ef5 Mon Sep 17 00:00:00 2001 From: John Breaux Date: Wed, 31 Jul 2024 10:43:58 -0500 Subject: [PATCH] Remove dependency on nightly Rust --- examples/msp430-help/main.rs | 1 - msp430-asm/src/main.rs | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/msp430-help/main.rs b/examples/msp430-help/main.rs index 02b60c8..6442bf8 100644 --- a/examples/msp430-help/main.rs +++ b/examples/msp430-help/main.rs @@ -1,7 +1,6 @@ // This example contains information adapted from the MSPGCC project's documentation. // As such, it is licensed under the GPL, to the extent that such a thing is possible. // https://mspgcc.sourceforge.net/manual/ln16.html -#![feature(decl_macro)] fn main() { println!("Hello, world!") diff --git a/msp430-asm/src/main.rs b/msp430-asm/src/main.rs index 1f638c3..f322383 100644 --- a/msp430-asm/src/main.rs +++ b/msp430-asm/src/main.rs @@ -1,7 +1,6 @@ // © 2023-2024 John Breaux //See LICENSE.md for license //! Simple frontend for the assembler -#![feature(decl_macro)] use argp::parse_args_or_exit; use libmsp430::{ assembler::Assemble, @@ -66,14 +65,16 @@ mod repl { use std::io::{stderr, Write}; /// Formats the line number - macro linenr($n: expr) { - format_args!("{:4}: ", $n) + macro_rules! linenr { + ($n: expr) => { + format_args!("{:4}: ", $n) + }; } /// [println], but without the newline - macro printfl ($($x: expr),+) { + macro_rules! printfl {($($x: expr),+) => { {print!($($x),+); let _ = ::std::io::stdout().flush();} - } + }} /// Runs the read-evaluate-print loop pub fn repl(buf: &mut String) -> Result<(), Box> {