s/``/``rust when relevant

It looks better on the wiki/the new documentation page.
This commit is contained in:
mcarton 2016-07-29 20:36:33 +02:00
parent 0fbb0bf77b
commit 81b9b2ca85
No known key found for this signature in database
GPG Key ID: 5E427C794CBA45E8
5 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ contains some questionable code itself! Also before making a pull request, pleas
travis build actually checks for this.
Also please document your lint with a doc comment akin to the following:
```
```rust
/// **What it does:** Describe what the lint matches.
///
/// **Why is this bad?** Write the reason for linting the code.

View File

@ -2,7 +2,7 @@
//!
//! For example, the lint would catch:
//!
//! ```
//! ```rust
//! if x {
//! if y {
//! println!("Hello world");

View File

@ -11,7 +11,7 @@ use utils::{get_item_name, match_type, paths, snippet, span_lint_and_then, walk_
/// **Why is this bad?** Using `entry` is more efficient.
///
/// **Known problems:** Some false negatives, eg.:
/// ```
/// ```rust
/// let k = &key;
/// if !m.contains_key(k) { m.insert(k.clone(), v); }
/// ```

View File

@ -65,7 +65,7 @@ impl LateLintPass for Pass {
}
/// Checks if the expressions matches
/// ```
/// ```rust
/// { static __STATIC_FMTSTR: &[""] = _; __STATIC_FMTSTR }
/// ```
fn check_static_str(cx: &LateContext, expr: &Expr) -> bool {
@ -91,7 +91,7 @@ fn check_static_str(cx: &LateContext, expr: &Expr) -> bool {
}
/// Checks if the expressions matches
/// ```
/// ```rust
/// &match (&42,) {
/// (__arg0,) => [::std::fmt::ArgumentV1::new(__arg0, ::std::fmt::Display::fmt)],
/// })

View File

@ -357,7 +357,7 @@ impl LateLintPass for ModuloOne {
/// **Known problems:** None
///
/// **Example**:
/// ```
/// ```rust
/// match v {
/// Some(x) => (),
/// y @ _ => (), // easier written as `y`,
@ -399,7 +399,7 @@ impl LateLintPass for PatternPass {
/// allowed in the mean time.
///
/// **Example**:
/// ```
/// ```rust
/// let _x = 0;
/// let y = _x + 1; // Here we are using `_x`, even though it has a leading underscore.
/// // We should rename `_x` to `x`