rust/tests/ui/doc_link_with_quotes.rs

26 lines
503 B
Rust
Raw Normal View History

2022-02-01 11:21:42 +00:00
#![warn(clippy::doc_link_with_quotes)]
fn main() {
foo()
}
/// Calls ['bar'] uselessly
//~^ ERROR: possible intra-doc link using quotes instead of backticks
//~| NOTE: `-D clippy::doc-link-with-quotes` implied by `-D warnings`
2022-02-01 11:21:42 +00:00
pub fn foo() {
bar()
}
2023-11-15 21:38:50 +00:00
/// Calls ["bar"] uselessly
//~^ ERROR: possible intra-doc link using quotes instead of backticks
pub fn foo2() {
bar()
}
/// # Examples
/// This demonstrates issue \#8961
/// ```
/// let _ = vec!['w', 'a', 't'];
/// ```
2022-02-01 11:21:42 +00:00
pub fn bar() {}