You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #55003 - zackmdavis:must_use_assoc_fn, r=varkor
`#[must_use]` for associated functions is supposed to actually work
In the comments of (closed, defunct) pull request #54884, @Centril [noted that](#54884 (comment)) must-use annotations didn't work on an associated function (what other communities might call a "static method"). Subsequent logging revealed that in this case we have a `Def::Method`, whereas the lint pass was only matching on `Def::Fn`. (One could argue that those def-names are thereby misleading—must-use for `self`-ful methods have always worked—but documenting or reworking that can be left to another day.)
r? @varkor
0 commit comments