Re: [PATCH v3 1/2] rust: Introduce file_from_location()
From: Alice Ryhl
Date: Tue Jun 17 2025 - 05:26:15 EST
On Mon, Jun 16, 2025 at 11:19:52PM +0200, Miguel Ojeda wrote:
> On Mon, Jun 16, 2025 at 5:36 PM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
> >
> > introduce a file_from_location() function, which return a warning string
>
> returns
>
> > #![cfg_attr(not(CONFIG_RUSTC_HAS_COERCE_POINTEE), feature(coerce_unsized))]
> > #![cfg_attr(not(CONFIG_RUSTC_HAS_COERCE_POINTEE), feature(dispatch_from_dyn))]
> > #![cfg_attr(not(CONFIG_RUSTC_HAS_COERCE_POINTEE), feature(unsize))]
> > +#![cfg_attr(CONFIG_RUSTC_HAS_LOCATION_FILE_WITH_NUL, feature(file_with_nul))]
>
> I would change the config name to `CONFIG_RUSTC_HAS_FILE_WITH_NUL`
> since that is the actual name, i.e. without "location".
We will need to coordinate with
https://github.com/rust-lang/rust/pull/142579
> By the way, please add a comment on top, like the others, i.e. something like:
>
> //
> // `feature(file_with_nul)` is expected to become stable. Before Rust
> // 1.89.0, it did not exist, so enable it conditionally.
>
> Alice: the tracking issue uses the wrong name, i.e. with the
> `location_*` prefix.
Fixed.
Alice