On 2025-10-17 at 05:44 +1100, Miguel Ojeda <[email protected]> 
wrote...
> On Mon, Oct 13, 2025 at 8:21 AM Alistair Popple <[email protected]> wrote:
> >
> > -rust_allowed_features := 
> > asm_const,asm_goto,arbitrary_self_types,lint_reasons,offset_of_nested,raw_ref_op,used_with_arg
> > +rust_allowed_features := 
> > asm_const,asm_goto,arbitrary_self_types,lint_reasons,offset_of_nested,raw_ref_op,used_with_arg,slice_flatten
> 
> This is not sorted, and it is not mentioned in the comment right above
> it -- in general, please try to clearly mention this sort of addition
> in the commit message too.
> 
> As Alexandre mentions, it will not work to use it as-is. However, what
> happened in 1.80 was just a rename, but the feature was available
> since 1.67 as `flatten`.

Argh! Thanks, I wasn't aware the function had been renamed.

> If you want to still use it through an indirection or similar, then
> please move it to a new commit that explains the addition of the
> feature and the indirection to use it.

That makes sense, thanks for the explaination.

> See e.g. the `file()` function I added in e.g. rust/macros/helpers.rs
> in commit 36174d16f3ec ("rust: kunit: support KUnit-mapped `assert!`
> macros in `#[test]`s") to see how to set it up.
> 
> Essentially it is:
> 
>     config RUSTC_HAS_SPAN_FILE
>            def_bool RUSTC_VERSION >= 108800
> 
> And then:
> 
>     pub(crate) fn file() -> String {
>         #[cfg(not(CONFIG_RUSTC_HAS_SPAN_FILE))]
>         {
>             ...
>         }
> 
>         #[cfg(CONFIG_RUSTC_HAS_SPAN_FILE)]
>         #[allow(clippy::incompatible_msrv)]
>         {
>             ...
>         }
>     }
> 
> I hope that helps.
> 
> Thanks!
> 
> Cheers,
> Miguel

Reply via email to