On Thu, Oct 24, 2024 at 11:02 AM Paolo Bonzini <pbonz...@redhat.com> wrote: > > 'span_locations' is not subject to any version check in build.rs. Is it > > removed because of its performance penalty and the fact that we are not > > using it anywhere? > > The docs say "When executing in a procedural macro context, the > returned line/column are only meaningful if compiled with a nightly > toolchain. The stable toolchain does not have this information > available. When executing outside of a procedural macro, such as > main.rs or build.rs, the line/column are always meaningful regardless > of toolchain". So for our case it seems useless.
Ah, it's also removed because we don't specify it the feature in qemu-api-macros/Cargo.toml, and therefore the build script does not emit the corresponding cargo:rustc-cfg line. $ OUT_DIR=$PWD/proc-macro2-0b9b0b4e3b86e043 \ RUSTC=$(rustup +1.63.0 which rustc) \ proc-macro2-0b9b0b4e3b86e043/build-script-build cargo:rustc-cfg=no_source_text cargo:rustc-cfg=no_literal_byte_character cargo:rustc-cfg=no_literal_c_string cargo:rerun-if-changed=build/probe.rs cargo:rustc-cfg=wrap_proc_macro cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP Paolo