You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the Getters derive panics when encountering a raw identifier. The error was reproducible on master as well as the most recently published crates.io version:
± cargo build
Compiling getset-bug v0.1.0 (/Users/pwoolcock/code/getset-bug)
thread 'rustc' panicked at '`"r#type"` is not a valid identifier', src/librustc_expand/proc_macro_server.rs:329:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.44.0-nightly (f4c675c47 2020-03-19) running on x86_64-apple-darwin
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: proc-macro derive panicked
--> src/lib.rs:3:10
|
3 | #[derive(Getters)]
| ^^^^^^^
|
= help: message: `"r#type"` is not a valid identifier
error: aborting due to previous error
error: could not compile `getset-bug`.
To learn more, run the command again with --verbose.
and here's the code I used to generate this error:
use getset::Getters;
#[derive(Getters)]
pub struct Foo {
r#type: String,
}
The text was updated successfully, but these errors were encountered:
It appears that the
Getters
derive panics when encountering a raw identifier. The error was reproducible onmaster
as well as the most recently published crates.io version:and here's the code I used to generate this error:
The text was updated successfully, but these errors were encountered: