Merge pull request #2010 from rust-lang-nursery/doc_improvements

some small doc improvements
This commit is contained in:
Oliver Schneider 2017-09-02 07:22:21 +02:00 committed by GitHub
commit 3d62676d2f
3 changed files with 8 additions and 6 deletions

View file

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

View file

@ -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.
///

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
/// `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