On Mon, Mar 2, 2026 at 8:19 AM Andreas Hindborg <[email protected]> wrote: > > I was thinking something similar, in clippy or checkpatch.pl. If we > should always have this attribute for small functions, we need to have a > check.
No, as Gary said, we do not always want to have it. So something trivial in `checkpatch.pl` or something like the existing Clippy lint would have quite bad false positives (and even false negatives, in the case of `checkpatch.pl`, depending on what logic you are thinking about). We would need cross-TU heuristics for this, because at the end of the day what you are trying to say is "this function will end up being trivial even if it may look like it doesn't before inlining everything". Cheers, Miguel
