rust/tests/ui/macros/unknown-builtin.rs
Mara Bos 6c865c1e14 Allow builtin macros to be used more than once.
This removes E0773 "A builtin-macro was defined more than once."
2025-03-19 14:12:47 +01:00

14 lines
324 B
Rust

#![feature(rustc_attrs)]
#[rustc_builtin_macro]
macro_rules! unknown { () => () } //~ ERROR cannot find a built-in macro with name `unknown`
// Defining another `line` builtin macro should not cause an error.
#[rustc_builtin_macro]
macro_rules! line { () => () }
fn main() {
line!();
std::prelude::v1::line!();
}