Re: [PATCH] .gitignore: ignore rustc long type txt files
From: Nathan Chancellor
Date: Thu May 28 2026 - 16:44:21 EST
On Thu, May 28, 2026 at 01:53:46PM +0200, Miguel Ojeda wrote:
> On Thu, May 21, 2026 at 12:29 PM Manos Pitsidianakis
> <manos@xxxxxxxxxxxxxx> wrote:
> >
> > When rustc prints an error containing a long type that doesn't fit in a
> > line, it will write the whole thing in a .txt file and print messages
> > like:
> >
> > note: the full type name has been written to
> > 'path/to/subsystem/module_name.long-type-11621316855315349594.txt
> >
> > Long types like core::result::Result<core::pin::Pin<Box<_, Kmalloc,
> > kernel::error::Error>: pin_init::PinInit<Box<_, Kmalloc>, _> are common
> > during development, so add a gitignore entry.
> >
> > Signed-off-by: Manos Pitsidianakis <manos@xxxxxxxxxxxxxx>
>
> Cc'ing Nathan, Nicolas and Kbuild -- I considered whether deleting
> these in e.g. `distclean`. They are only error artifacts, i.e. the
> build system doesn't create these intentionally -- they come from the
> Rust compiler in a minority of error cases (where type names are
> long).
>
> So end users shouldn't see them anyway, so I am not sure what the policy is.
I view these more like build artifacts since the messages in them are
really only relevant to a specific build instance, so I would probably
clean them up with 'clean' over 'mrproper' / 'distclean'. But if they are in
.gitignore, I don't think it matters too much though, but it does feel
like they should be cleaned up with at least 'distclean'.
--
Cheers,
Nathan