Fix accuracy of T: Clone
check in suggestion
This commit is contained in:
parent
259348cf7e
commit
5a7caa3174
17 changed files with 51 additions and 72 deletions
|
@ -988,6 +988,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
}
|
||||
|
||||
pub(crate) fn suggest_cloning(&self, err: &mut Diag<'_>, ty: Ty<'tcx>, expr: &hir::Expr<'_>) {
|
||||
let ty = ty.peel_refs();
|
||||
if let Some(clone_trait_def) = self.infcx.tcx.lang_items().clone_trait()
|
||||
&& self
|
||||
.infcx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue