-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: expr in place where literal is expected (builtin attr parsing)
#137687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
smaller #[crate_name = concat !()]
macro_rules !a {
() => {}
}
fn main() {} |
Here we go again 😂. @rustbot claim |
Ah, crate_name probably has similar exceptions as crate type from last time. I know how to fix so that's good :) |
Yes :) albeit more recent and even stricter: #127581 (merged two weeks ago) :D |
Crater #139827 turned up a few of these as well: |
Minimized from the levi repo (from the crater results): src/lib.rs: macro_rules! call_macro {
($text:expr) => {
#[derive(bar::Bar)]
#[arg($text)]
pub struct Foo;
};
}
call_macro!(1 + 1); bar/src/lib.rs extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(Bar, attributes(arg))]
pub fn derive_bar(_: proc_macro::TokenStream) -> proc_macro::TokenStream {
TokenStream::new()
} Zip of all files required for reproduction: repro.zip |
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --crate-type=lib
Program output
The text was updated successfully, but these errors were encountered: