-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Closed
Copy link
Labels
A-idegeneral IDE featuresgeneral IDE featuresA-macromacro expansionmacro expansionC-bugCategory: bugCategory: bugE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedgood first issue
Description
So I have a main.rs like this:
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
// ...
submodule!(defer);In this case the submodule! macro just takes a module name once and then spits out the mod as well as the pub use:
#[macro_export]
macro_rules! submodule {
($sub_module_vis:vis $sub_module_name:ident) => {
$sub_module_vis mod $sub_module_name;
pub use $sub_module_name::*;
}
}Okay, so given all that, if I use the "rename" feature to change the name of the defer module to something like defertest, then the identifier in the macro use gets changed properly, and the file on disk is renamed properly, but also part of the top line of the main.rs file is mangled to have the new module name in it:
#![defertestttr(not(debug_assertions), windows_subsystem = "windows")]Metadata
Metadata
Assignees
Labels
A-idegeneral IDE featuresgeneral IDE featuresA-macromacro expansionmacro expansionC-bugCategory: bugCategory: bugE-easyE-has-instructionsIssue has some instructions and pointers to code to get startedIssue has some instructions and pointers to code to get startedgood first issue