some small doc improvements
This commit is contained in:
parent
5d36bfafa3
commit
df29c87303
@ -13,7 +13,6 @@ use utils::span_lint;
|
||||
/// ```rust
|
||||
/// a + b < a
|
||||
/// ```
|
||||
|
||||
declare_lint! {
|
||||
pub OVERFLOW_CHECK_CONDITIONAL,
|
||||
Warn,
|
||||
|
@ -11,10 +11,9 @@ use syntax::codemap::{Span, BytePos};
|
||||
use syntax::symbol::InternedString;
|
||||
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`,
|
||||
/// `RegexBuilder::new` or `RegexSet::new`) for correct regex syntax.
|
||||
///
|
||||
/// [regex]: https://crates.io/crates/regex
|
||||
/// **What it does:** Checks [regex](https://crates.io/crates/regex) creation
|
||||
/// (with `Regex::new`,`RegexBuilder::new` or `RegexSet::new`) for correct
|
||||
/// regex syntax.
|
||||
///
|
||||
/// **Why is this bad?** This will lead to a runtime panic.
|
||||
///
|
||||
|
@ -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
|
||||
/// `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:**
|
||||
/// ```rust
|
||||
|
Loading…
Reference in New Issue
Block a user