Fix ICE 89775
This commit is contained in:
parent
1067e2ca5e
commit
148f456cc6
@ -704,7 +704,9 @@ fn suggest_add_reference_to_arg(
|
||||
.filter_map(|lang_item| self.tcx.lang_items().require(*lang_item).ok())
|
||||
.collect();
|
||||
|
||||
never_suggest_borrow.push(self.tcx.get_diagnostic_item(sym::Send).unwrap());
|
||||
if let Some(def_id) = self.tcx.get_diagnostic_item(sym::Send) {
|
||||
never_suggest_borrow.push(def_id);
|
||||
}
|
||||
|
||||
let param_env = obligation.param_env;
|
||||
let trait_ref = poly_trait_ref.skip_binder();
|
||||
|
@ -30,7 +30,8 @@
|
||||
/// [arc]: ../../std/sync/struct.Arc.html
|
||||
/// [ub]: ../../reference/behavior-considered-undefined.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
|
||||
#[cfg_attr(all(not(test), bootstrap), rustc_diagnostic_item = "send_trait")]
|
||||
#[cfg_attr(all(not(test), not(bootstrap)), rustc_diagnostic_item = "Send")]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "`{Self}` cannot be sent between threads safely",
|
||||
label = "`{Self}` cannot be sent between threads safely"
|
||||
|
Loading…
Reference in New Issue
Block a user