some small doc improvements

This commit is contained in:
Andre Bogus 2017-09-01 22:43:34 +02:00
parent 5d36bfafa3
commit df29c87303
3 changed files with 8 additions and 6 deletions

View File

@ -13,7 +13,6 @@ use utils::span_lint;
/// ```rust /// ```rust
/// a + b < a /// a + b < a
/// ``` /// ```
declare_lint! { declare_lint! {
pub OVERFLOW_CHECK_CONDITIONAL, pub OVERFLOW_CHECK_CONDITIONAL,
Warn, Warn,

View File

@ -11,10 +11,9 @@ use syntax::codemap::{Span, BytePos};
use syntax::symbol::InternedString; use syntax::symbol::InternedString;
use utils::{is_expn_of, match_def_path, match_type, paths, span_lint, span_help_and_lint}; use utils::{is_expn_of, match_def_path, match_type, paths, span_lint, span_help_and_lint};
/// **What it does:** Checks [regex] creation (with `Regex::new`, /// **What it does:** Checks [regex](https://crates.io/crates/regex) creation
/// `RegexBuilder::new` or `RegexSet::new`) for correct regex syntax. /// (with `Regex::new`,`RegexBuilder::new` or `RegexSet::new`) for correct
/// /// regex syntax.
/// [regex]: https://crates.io/crates/regex
/// ///
/// **Why is this bad?** This will lead to a runtime panic. /// **Why is this bad?** This will lead to a runtime panic.
/// ///

View File

@ -1008,7 +1008,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CharLitAsU8 {
/// that is is possible for `x` to be less than the minimum. Expressions like /// that is is possible for `x` to be less than the minimum. Expressions like
/// `max < x` are probably mistakes. /// `max < x` are probably mistakes.
/// ///
/// **Known problems:** None. /// **Known problems:** For `usize` the size of the current compile target will
/// be assumed (e.g. 64 bits on 64 bit systems). This means code that uses such
/// a comparison to detect target pointer width will trigger this lint. One can
/// use `mem::sizeof` and compare its value or conditional compilation attributes
/// like `#[cfg(target_pointer_width = "64")] ..` instead.
/// ///
/// **Example:** /// **Example:**
/// ```rust /// ```rust