diff options
Diffstat (limited to 'src/docs/duplicate_mod.txt')
| -rw-r--r-- | src/docs/duplicate_mod.txt | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/docs/duplicate_mod.txt b/src/docs/duplicate_mod.txt deleted file mode 100644 index 709a9aba03a..00000000000 --- a/src/docs/duplicate_mod.txt +++ /dev/null @@ -1,31 +0,0 @@ -### What it does -Checks for files that are included as modules multiple times. - -### Why is this bad? -Loading a file as a module more than once causes it to be compiled -multiple times, taking longer and putting duplicate content into the -module tree. - -### Example -``` -// lib.rs -mod a; -mod b; -``` -``` -// a.rs -#[path = "./b.rs"] -mod b; -``` - -Use instead: - -``` -// lib.rs -mod a; -mod b; -``` -``` -// a.rs -use crate::b; -``` \ No newline at end of file |
