]> git.lizzy.rs Git - rust.git/commitdiff
Whitelist Nan in `DOC_MARKDOWN`
authormcarton <cartonmartin+git@gmail.com>
Wed, 8 Jun 2016 20:00:42 +0000 (22:00 +0200)
committermcarton <cartonmartin+git@gmail.com>
Thu, 9 Jun 2016 21:33:28 +0000 (23:33 +0200)
clippy_lints/src/utils/conf.rs
tests/compile-fail/doc.rs

index e773cc0e02505f49838614c8df4b2b6ece21176b..851764edc2880010e177472c762d385ecde2fd19 100644 (file)
@@ -151,7 +151,7 @@ fn set(&mut self, name: String, value: toml::Value) -> Result<(), ConfError> {
     /// Lint: CYCLOMATIC_COMPLEXITY. The maximum cyclomatic complexity a function can have
     ("cyclomatic-complexity-threshold", cyclomatic_complexity_threshold, 25 => u64),
     /// Lint: DOC_MARKDOWN. The list of words this lint should not consider as identifiers needing ticks
-    ("doc-valid-idents", doc_valid_idents, ["MiB", "GiB", "TiB", "PiB", "EiB", "GitHub"] => Vec<String>),
+    ("doc-valid-idents", doc_valid_idents, ["MiB", "GiB", "TiB", "PiB", "EiB", "GitHub", "NaN"] => Vec<String>),
     /// Lint: TOO_MANY_ARGUMENTS. The maximum number of argument a function or method can have
     ("too-many-arguments-threshold", too_many_arguments_threshold, 7 => u64),
     /// Lint: TYPE_COMPLEXITY. The maximum complexity a type can have
index d3b1c037f4702c185c0f190ba2694400ac236a91..415bcb2e661ff662e871e4480adf7885bd01cea0 100755 (executable)
@@ -46,6 +46,7 @@ fn test_emphasis() {
 /// 32kib 32Mib 32Gib 32Tib 32Pib 32Eib
 /// 32kB 32MB 32GB 32TB 32PB 32EB
 /// 32kb 32Mb 32Gb 32Tb 32Pb 32Eb
+/// NaN
 /// be_sure_we_got_to_the_end_of_it
 //~^ ERROR: you should put `be_sure_we_got_to_the_end_of_it` between ticks
 fn test_units() {