git attribute macros not allowed in submodules #5382
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change simply moves the
rust
macro definition directly into theattributes for
*.rs
files.git commands that recurse from the rust toplevel tree into submodules
produce errors in clippy due to the fact that:
"Custom macro attributes can be defined only in top-level
gitattributes files"
For example, from the toplevel
rust
directory in a rustc developmentbuild, try:
$ git grep "search string" --recurse-submodules
Embedded within the actual results is the error message:
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
not allowed: src/tools/clippy/.gitattributes:1
Thank you for making Clippy better!
We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
changelog
entry asnone
. Otherwise, please write a short commentexplaining your change.
If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.
If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.
.stderr
file)cargo test
passes locallycargo dev update_lints
cargo dev fmt
Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
Delete this line and everything above before opening your PR.
changelog: none