]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/doc.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / doc.rs
index b954e78999e259c140fdfc9ebbb9ecda0e36afb1..d4ba83a86f37bbb4fc884ae9a7c20ab7622f2489 100644 (file)
@@ -1,14 +1,21 @@
-//! This file tests for the DOC_MARKDOWN lint
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
-#![feature(plugin)]
-#![plugin(clippy)]
+//! This file tests for the DOC_MARKDOWN lint
 
-#![deny(doc_markdown)]
+#![allow(dead_code)]
+#![warn(clippy::doc_markdown)]
 
 /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
 /// Markdown is _weird_. I mean _really weird_.  This \_ is ok. So is `_`. But not Foo::some_fun
 /// which should be reported only once despite being __doubly bad__.
-/// Here be ::is::a::global:path.
+/// Here be ::a::global:path.
 /// That's not code ~NotInCodeBlock~.
 /// be_sure_we_got_to_the_end_of_it
 fn foo_bar() {
@@ -49,37 +56,8 @@ fn test_emphasis() {
 fn test_units() {
 }
 
-/// This one checks we don’t try to split unicode codepoints
-/// `ß`
-/// `ℝ`
-/// `💣`
-/// `❤️`
-/// ß_foo
-/// ℝ_foo
-/// 💣_foo
-/// ❤️_foo
-/// foo_ß
-/// foo_ℝ
-/// foo_💣
-/// foo_❤️
-/// [ßdummy textß][foo_1ß]
-/// [ℝdummy textℝ][foo_2ℝ]
-/// [💣dummy tex💣t][foo3_💣]
-/// [❤️dummy text❤️][foo_4❤️]
-/// [ßdummy textß](foo_5ß)
-/// [ℝdummy textℝ](foo_6ℝ)
-/// [💣dummy tex💣t](fo7o_💣)
-/// [❤️dummy text❤️](foo_8❤️)
-/// [foo1_ß]: dummy text
-/// [foo2_ℝ]: dummy text
-/// [foo3_💣]: dummy text
-/// [foo4_❤️]: dummy text
-/// be_sure_we_got_to_the_end_of_it
-fn test_unicode() {
-}
-
 /// This test has [a link_with_underscores][chunked-example] inside it. See #823.
-/// See also [the issue tracker](https://github.com/Manishearth/rust-clippy/search?q=doc_markdown&type=Issues)
+/// See also [the issue tracker](https://github.com/rust-lang/rust-clippy/search?q=clippy::doc_markdown&type=Issues)
 /// on GitHub (which is a camel-cased word, but is OK). And here is another [inline link][inline_link].
 /// It can also be [inline_link2].
 ///
@@ -167,3 +145,43 @@ fn issue1073_alt() {
 /// be_sure_we_got_to_the_end_of_it
 fn four_quotes() {
 }
+
+/// See [NIST SP 800-56A, revision 2].
+///
+/// [NIST SP 800-56A, revision 2]:
+///     https://github.com/rust-lang/rust-clippy/issues/902#issuecomment-261919419
+fn issue_902_comment() {}
+
+#[cfg_attr(feature = "a", doc = " ```")]
+#[cfg_attr(not(feature = "a"), doc = " ```ignore")]
+/// fn main() {
+///     let s = "localhost:10000".to_string();
+///     println!("{}", s);
+/// }
+/// ```
+fn issue_1469() {}
+
+/**
+ * This is a doc comment that should not be a list
+ *This would also be an error under a strict common mark interpretation
+ */
+fn issue_1920() {}
+
+/// Ok: <http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels>
+///
+/// Not ok: http://www.unicode.org
+/// Not ok: https://www.unicode.org
+/// Not ok: http://www.unicode.org/
+/// Not ok: http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
+fn issue_1832() {}
+
+/// Ok: CamelCase (It should not be surrounded by backticks)
+fn issue_2395() {}
+
+/// An iterator over mycrate::Collection's values.
+/// It should not lint a `'static` lifetime in ticks.
+fn issue_2210() {}
+
+/// This should not cause the lint to trigger:
+/// #REQ-data-family.lint_partof_exists
+fn issue_2343() {}