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
If you run cargo build in poc there, the span_lint shows:
Compiling poc v0.1.0 (file:///home/manishearth/sand/bar/poc)
src/lib.rs:7:10: 7:19 error: this let-binding has unit value.
src/lib.rs:7 #[derive(Serialize)]
^~~~~~~~~
src/lib.rs:4:9: 4:23 note: lint level defined here
src/lib.rs:4 #![deny(let_unit_value)]
^~~~~~~~~~~~~~
src/lib.rs:7:10: 7:19 error: this let-binding has unit value.
src/lib.rs:7 #[derive(Serialize)]
^~~~~~~~~
src/lib.rs:4:9: 4:23 note: lint level defined here
src/lib.rs:4 #![deny(let_unit_value)]
^~~~~~~~~~~~~~
error: aborting due to 2 previous errors
Could not compile `poc`.
I'm running a nightly, and serde by default uses the plugin infrastructure, so I doubt it's syntex causing any issues here. (Also for that to happen I'd need a build script on my side)
What's unusual here is that the span_lints don't say anything about being part of a macro. They're actually catching a let binding from inside the macro (I verified this by running it on the expanded code) -- but the span says nothing about expansion and just points at derive(). I think the ExpnInfo has vanished somehow, but I'm not sure.
https://github.com/Manishearth/scratch/tree/rustc_serde_spans
If you run
cargo build
inpoc
there, thespan_lint
shows:I'm running a nightly, and serde by default uses the plugin infrastructure, so I doubt it's syntex causing any issues here. (Also for that to happen I'd need a build script on my side)
What's unusual here is that the
span_lint
s don't say anything about being part of a macro. They're actually catching a let binding from inside the macro (I verified this by running it on the expanded code) -- but the span says nothing about expansion and just points atderive()
. I think theExpnInfo
has vanished somehow, but I'm not sure.cc @eddyb @erickt
The text was updated successfully, but these errors were encountered: