Skip to content

Commit

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

Successful merges:

 - #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
 - #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
  • Loading branch information
bors committed Nov 23, 2019
2 parents 35a559f + b452400 commit eb8cd54
Show file tree
Hide file tree
Showing 20 changed files with 549 additions and 294 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 eb8cd54

Please sign in to comment.