Rollup merge of #83673 - hi-rustin:rustin-patch-suggestion, r=estebank

give full path of constraint in suggest_constraining_type_param

close https://github.com/rust-lang/rust/issues/83513
This commit is contained in:
Dylan DPC 2021-04-02 19:57:32 +02:00 committed by GitHub
commit 6cb74ad99f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 249 additions and 247 deletions

View file

@ -28,6 +28,7 @@ use std::fmt;
use super::InferCtxtPrivExt;
use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
use rustc_middle::ty::print::with_no_trimmed_paths;
#[derive(Debug)]
pub enum GeneratorInteriorOrUpvar {
@ -440,7 +441,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
{
// Missing generic type parameter bound.
let param_name = self_ty.to_string();
let constraint = trait_ref.print_only_trait_path().to_string();
let constraint =
with_no_trimmed_paths(|| trait_ref.print_only_trait_path().to_string());
if suggest_constraining_type_param(
self.tcx,
generics,