File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ REL-NAME is the file relative to the Cargo.toml file."
56
56
REL-NAME is the file relative to the Cargo.toml file."
57
57
(string-prefix-p " benches/" rel-name))
58
58
59
+ (defun flycheck-rust-example-p (rel-name )
60
+ " Whether REL-NAME denotes an example.
61
+
62
+ REL-NAME is the file relative to the Cargo.toml file."
63
+ (string-prefix-p " examples/" rel-name))
64
+
59
65
(defun flycheck-rust-project-root ()
60
66
" Get the project root for the current buffer.
61
67
@@ -79,6 +85,7 @@ Flycheck according to the Cargo project layout."
79
85
(unless (or (flycheck-rust-executable-p rel-name)
80
86
(flycheck-rust-test-p rel-name)
81
87
(flycheck-rust-bench-p rel-name)
88
+ (flycheck-rust-example-p rel-name)
82
89
(string= " src/lib.rs" rel-name))
83
90
; ; For other files, the library is either the default library or the
84
91
; ; executable
You can’t perform that action at this time.
0 commit comments