Use LanguageItems::require less
This commit is contained in:
parent
a6180ede5c
commit
1c8e658820
16 changed files with 34 additions and 45 deletions
|
@ -1019,7 +1019,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
let mut never_suggest_borrow: Vec<_> =
|
||||
[LangItem::Copy, LangItem::Clone, LangItem::Unpin, LangItem::Sized]
|
||||
.iter()
|
||||
.filter_map(|lang_item| self.tcx.lang_items().require(*lang_item).ok())
|
||||
.filter_map(|lang_item| self.tcx.lang_items().get(*lang_item))
|
||||
.collect();
|
||||
|
||||
if let Some(def_id) = self.tcx.get_diagnostic_item(sym::Send) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue