Skip to content

Commit

Permalink
Auto merge of #4838 - flip1995:rollup-defookd, r=flip1995
Browse files Browse the repository at this point in the history
Rollup of 6 pull requests

Successful merges:

 - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
 - #4764 (Allow casts from the result of `checked_abs` to unsigned)
 - #4766 (Fix false positive in derive_hash_xor_eq)
 - #4811 (Literal Representation Restructure)
 - #4820 (doc: fix the comment above the lint function)
 - #4830 (use more efficient code to generate repeated string)

Failed merges:

r? @ghost

changelog: none
  • Loading branch information
bors committed Nov 23, 2019
2 parents 60e8413 + 030ae86 commit 13d81bd
Show file tree
Hide file tree
Showing 22 changed files with 556 additions and 296 deletions.
1 change: 1 addition & 0 deletions clippy_lints/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ fn check_hash_peq<'a, 'tcx>(
if_chain! {
if match_path(&trait_ref.path, &paths::HASH);
if let Some(peq_trait_def_id) = cx.tcx.lang_items().eq_trait();
if !&trait_ref.trait_def_id().is_local();
then {
// Look for the PartialEq implementations for `ty`
cx.tcx.for_each_relevant_impl(peq_trait_def_id, ty, |impl_id| {
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/excessive_precision.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::utils::span_lint_and_sugg;
use crate::utils::sugg::format_numeric_literal;
use if_chain::if_chain;
use rustc::hir;
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
Expand Down Expand Up @@ -86,8 +87,7 @@ impl ExcessivePrecision {
if sym_str == s {
None
} else {
let di = super::literal_representation::DigitInfo::new(&s, true);
Some(di.grouping_hint())
Some(format_numeric_literal(&s, None, true))
}
} else {
None
Expand Down
Loading

0 comments on commit 13d81bd

Please sign in to comment.