Closed d-e-s-o closed 3 months ago
This seems like a syn bug, at a glance. We don't look inside function bodies ourselves. Can you file in https://github.com/dtolnay/syn/issues/new if it repros with an updated syn?
Thanks. Seems to reproduce until syn
1.0.109 and is fixed in syn
2.0.
Let's say I have the following Rust code:
And the following
build.rs
(usingcbindgen
0.26.0
):When I attempt compilation it fails with:
If I apply:
everything builds fine.
Somehow, the
as_ref::<'static>()
part appears to trigger https://doc.rust-lang.org/error_codes/E0224.html ? This seems to be valid Rust code to the degree I can tell, so I'd think thatcbindgen
shouldn't choke on it like that. Am I missing something?