From: mcarton Date: Wed, 8 Jun 2016 20:00:42 +0000 (+0200) Subject: Whitelist Nan in `DOC_MARKDOWN` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c5affa2efc697f478828c81def852f70968bb329;p=rust.git Whitelist Nan in `DOC_MARKDOWN` --- diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index e773cc0e025..851764edc28 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -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), + ("doc-valid-idents", doc_valid_idents, ["MiB", "GiB", "TiB", "PiB", "EiB", "GitHub", "NaN"] => Vec), /// 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 diff --git a/tests/compile-fail/doc.rs b/tests/compile-fail/doc.rs index d3b1c037f47..415bcb2e661 100755 --- a/tests/compile-fail/doc.rs +++ b/tests/compile-fail/doc.rs @@ -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() {