mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Merge pull request #2010 from rust-lang-nursery/doc_improvements
some small doc improvements
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
/// ```rust
|
||||
/// a + b < a
|
||||
/// ```
|
||||
|
||||
declare_lint! {
|
||||
pub OVERFLOW_CHECK_CONDITIONAL,
|
||||
Warn,
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
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 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
||||
/// 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
|
||||
|
||||
Reference in New Issue
Block a user