Skip to content

Commit

Permalink
add test for rust-lang#64784 Declarative macros can create infinite g…
Browse files Browse the repository at this point in the history
…lob import cycles

Fixes rust-lang#64784
  • Loading branch information
matthiaskrgr authored and RenjiSann committed Mar 25, 2024
1 parent f5b37c6 commit a4b0e0f
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ICE #64784 already borrowed: BorrowMutError
//@ check-pass
#![feature(decl_macro)]

pub macro m($i:ident, $j:ident) {
mod $i {
pub use crate::$j::*;
pub struct A;
}
}

m!(x, y);
m!(y, x);

fn main() {}

0 comments on commit a4b0e0f

Please sign in to comment.