1
Fork 0

Revert "Suggest using Arc on !Send/!Sync types"

This reverts commit 9de1a472b6.
This commit is contained in:
David Tolnay 2023-08-28 03:16:48 -07:00
parent 4120936f6d
commit 823bacb6e3
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
113 changed files with 13 additions and 223 deletions

View file

@ -2743,12 +2743,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
}
ObligationCauseCode::BindingObligation(item_def_id, span)
| ObligationCauseCode::ExprBindingObligation(item_def_id, span, ..) => {
if self.tcx.is_diagnostic_item(sym::Send, item_def_id)
|| self.tcx.lang_items().sync_trait() == Some(item_def_id)
{
return;
}
let item_name = tcx.def_path_str(item_def_id);
let short_item_name = with_forced_trimmed_paths!(tcx.def_path_str(item_def_id));
let mut multispan = MultiSpan::from(span);