-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #67755 - Marwes:lazy_lint, r=<try>
perf: Delay formatting of lint messages until they are know to be used Found that (touch+) `check` builds in one of my crates spent 5% of the time just formatting types for the sake of the `BoxPointers` lint, only for the strings to get thrown away immediately since it is an `allow` lint. This does the bare minimum to instead pass a `fmt::Display` instance to the lint so that `msg` may only be created if it is needed. Unsure if this is the desired way to solve this problem so I didn't go through the lint system throughly to see if there were more places that should take/pass `format_args!` instances instead of using `format!`.
- Loading branch information
Showing
5 changed files
with
62 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters