Skip to content

Commit

Permalink
Auto merge of rust-lang#5802 - flip1995:rustup, r=flip1995
Browse files Browse the repository at this point in the history
Rustup

r? @ghost
changelog: none
  • Loading branch information
bors committed Jul 15, 2020
2 parents 84cdce0 + d9bf74e commit b3614b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion clippy_lints/src/attrs.rs
Expand Up @@ -421,7 +421,11 @@ fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMet
.iter()
.map(|l| Symbol::intern(&l.name_lower()))
.collect::<Vec<_>>();
let sugg = find_best_match_for_name(symbols.iter(), &format!("clippy::{}", name_lower), None);
let sugg = find_best_match_for_name(
symbols.iter(),
Symbol::intern(&format!("clippy::{}", name_lower)),
None,
);
if lint_name.chars().any(char::is_uppercase)
&& lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok()
{
Expand Down
8 changes: 7 additions & 1 deletion clippy_lints/src/consts.rs
Expand Up @@ -332,7 +332,13 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
let result = self
.lcx
.tcx
.const_eval_resolve(self.param_env, def_id, substs, None, None)
.const_eval_resolve(
self.param_env,
ty::WithOptConstParam::unknown(def_id),
substs,
None,
None,
)
.ok()
.map(|val| rustc_middle::ty::Const::from_value(self.lcx.tcx, val, ty))?;
let result = miri_to_const(&result);
Expand Down

0 comments on commit b3614b4

Please sign in to comment.