Closed nrc closed 7 years ago
Minimal test case:
bar.rs:
#![feature(proc_macro)]
extern crate proc_macro;
use proc_macro::TokenStream;
use std::str::FromStr;
#[proc_macro_attribute]
pub fn dom_struct(_args: TokenStream, input: TokenStream) -> TokenStream {
TokenStream::from_str(&input.to_string().replace("Attr", "FooAttr")).unwrap()
}
foo.rs:
#![feature(proc_macro)]
extern crate bar;
use bar::dom_struct;
#[dom_struct]
pub struct Attr {
f: i32,
}
fn main() {
}
The ICE is easy to deal, with but then that exposes a span error - a span which should show up as generated code does not.