Skip to content

Commit 81b9b2c

Browse files
committed
s//rust when relevant
It looks better on the wiki/the new documentation page.
1 parent 0fbb0bf commit 81b9b2c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ contains some questionable code itself! Also before making a pull request, pleas
4141
travis build actually checks for this.
4242

4343
Also please document your lint with a doc comment akin to the following:
44-
```
44+
```rust
4545
/// **What it does:** Describe what the lint matches.
4646
///
4747
/// **Why is this bad?** Write the reason for linting the code.

clippy_lints/src/collapsible_if.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! For example, the lint would catch:
44
//!
5-
//! ```
5+
//! ```rust
66
//! if x {
77
//! if y {
88
//! println!("Hello world");

clippy_lints/src/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use utils::{get_item_name, match_type, paths, snippet, span_lint_and_then, walk_
1111
/// **Why is this bad?** Using `entry` is more efficient.
1212
///
1313
/// **Known problems:** Some false negatives, eg.:
14-
/// ```
14+
/// ```rust
1515
/// let k = &key;
1616
/// if !m.contains_key(k) { m.insert(k.clone(), v); }
1717
/// ```

clippy_lints/src/format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl LateLintPass for Pass {
6565
}
6666

6767
/// Checks if the expressions matches
68-
/// ```
68+
/// ```rust
6969
/// { static __STATIC_FMTSTR: &[""] = _; __STATIC_FMTSTR }
7070
/// ```
7171
fn check_static_str(cx: &LateContext, expr: &Expr) -> bool {
@@ -91,7 +91,7 @@ fn check_static_str(cx: &LateContext, expr: &Expr) -> bool {
9191
}
9292

9393
/// Checks if the expressions matches
94-
/// ```
94+
/// ```rust
9595
/// &match (&42,) {
9696
/// (__arg0,) => [::std::fmt::ArgumentV1::new(__arg0, ::std::fmt::Display::fmt)],
9797
/// })

clippy_lints/src/misc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl LateLintPass for ModuloOne {
357357
/// **Known problems:** None
358358
///
359359
/// **Example**:
360-
/// ```
360+
/// ```rust
361361
/// match v {
362362
/// Some(x) => (),
363363
/// y @ _ => (), // easier written as `y`,
@@ -399,7 +399,7 @@ impl LateLintPass for PatternPass {
399399
/// allowed in the mean time.
400400
///
401401
/// **Example**:
402-
/// ```
402+
/// ```rust
403403
/// let _x = 0;
404404
/// let y = _x + 1; // Here we are using `_x`, even though it has a leading underscore.
405405
/// // We should rename `_x` to `x`

0 commit comments

Comments
 (0)