Auto merge of #5802 - flip1995:rustup, r=flip1995

Rustup

r? @ghost
changelog: none
This commit is contained in:
bors 2020-07-15 18:17:25 +00:00
commit b3614b42d5
2 changed files with 12 additions and 2 deletions

View File

@ -421,7 +421,11 @@ fn extract_name(lint: &NestedMetaItem) -> Option<SymbolStr> {
.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()
{

View File

@ -332,7 +332,13 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
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);