Merge remote-tracking branch 'upstream/master' into rustup
This commit is contained in:
commit
d300cdfcda
190 changed files with 2531 additions and 865 deletions
|
|
@ -80,7 +80,7 @@ impl<'tcx> LateLintPass<'tcx> for InterningDefinedSymbol {
|
|||
&& let ty = cx.tcx.type_of(item_def_id).instantiate_identity()
|
||||
&& match_type(cx, ty, &paths::SYMBOL)
|
||||
&& let Ok(ConstValue::Scalar(value)) = cx.tcx.const_eval_poly(item_def_id)
|
||||
&& let Ok(value) = value.to_u32()
|
||||
&& let Some(value) = value.to_u32().discard_err()
|
||||
{
|
||||
self.symbol_map.insert(value, item_def_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ pub fn check_path(cx: &LateContext<'_>, path: &[&str]) -> bool {
|
|||
SimplifiedType::Bool,
|
||||
]
|
||||
.iter()
|
||||
.flat_map(|&ty| cx.tcx.incoherent_impls(ty).into_iter())
|
||||
.flatten()
|
||||
.flat_map(|&ty| cx.tcx.incoherent_impls(ty).iter())
|
||||
.copied();
|
||||
for item_def_id in lang_items.iter().map(|(_, def_id)| def_id).chain(incoherent_impls) {
|
||||
let lang_item_path = cx.get_def_path(item_def_id);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ struct LintCollector<'a, 'tcx> {
|
|||
cx: &'a LateContext<'tcx>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> Visitor<'tcx> for LintCollector<'a, 'tcx> {
|
||||
impl<'tcx> Visitor<'tcx> for LintCollector<'_, 'tcx> {
|
||||
type NestedFilter = nested_filter::All;
|
||||
|
||||
fn visit_path(&mut self, path: &Path<'_>, _: HirId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue