]> git.lizzy.rs Git - rust.git/commitdiff
git attribute macros not allowed in submodules
authorRich Kadel <richkadel@google.com>
Sun, 29 Mar 2020 13:58:37 +0000 (06:58 -0700)
committerRich Kadel <richkadel@google.com>
Sun, 29 Mar 2020 13:58:37 +0000 (06:58 -0700)
This change simply moves the `rust` macro definition directly into the
attributes 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 development
build, 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

.gitattributes

index 796afdbde90dd6bb39255963b27a217aad32947f..90cf33053c77587326cfec3e29e0f6caa73db1ca 100644 (file)
@@ -1,5 +1,3 @@
-[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
-
 * text=auto eol=lf
-*.rs rust
+*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
 *.fixed linguist-language=Rust