On Thu, Oct 24, 2024 at 4:35 AM Junjie Mao <junjie....@hotmail.com> wrote:
>
>
> Paolo Bonzini <pbonz...@redhat.com> writes:
>
> > Replay the configuration that would be computed by build.rs when compiling
> > on a 1.63.0 compiler.
> >
> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
>
> Reviewed-by: Junjie Mao <junjie....@hotmail.com>
>
> One question below.
>
> > ---
> >  subprojects/packagefiles/proc-macro2-1-rs/meson.build | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/subprojects/packagefiles/proc-macro2-1-rs/meson.build 
> > b/subprojects/packagefiles/proc-macro2-1-rs/meson.build
> > index 818ec59336b..8e601b50ccc 100644
> > --- a/subprojects/packagefiles/proc-macro2-1-rs/meson.build
> > +++ b/subprojects/packagefiles/proc-macro2-1-rs/meson.build
> > @@ -15,7 +15,9 @@ _proc_macro2_rs = static_library(
> >    rust_abi: 'rust',
> >    rust_args: [
> >      '--cfg', 'feature="proc-macro"',
> > -    '--cfg', 'span_locations',
>
> '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.

Paolo


Reply via email to