diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 18:51:01 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-10-02 19:38:19 -0500 |
| commit | eec856bfbcd79d12352f81b44a9f04e5bb06bda5 (patch) | |
| tree | de49e7a7c12ca371082c5ff3356eb271853cc5bb /compiler/rustc_trait_selection/src | |
| parent | f03eb6bef8ced8a243858b819e013b9caf83d757 (diff) | |
| download | rust-eec856bfbcd79d12352f81b44a9f04e5bb06bda5.tar.gz rust-eec856bfbcd79d12352f81b44a9f04e5bb06bda5.zip | |
Make diangostic item names consistent
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index b751918463b..93ddec61dc4 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -533,9 +533,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { // example). let trait_is_debug = - self.tcx.is_diagnostic_item(sym::debug_trait, trait_ref.def_id()); + self.tcx.is_diagnostic_item(sym::Debug, trait_ref.def_id()); let trait_is_display = - self.tcx.is_diagnostic_item(sym::display_trait, trait_ref.def_id()); + self.tcx.is_diagnostic_item(sym::Display, trait_ref.def_id()); let in_std_macro = match obligation.cause.span.ctxt().outer_expn_data().macro_def_id { diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 325126483b9..61f5856334d 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -702,7 +702,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { .filter_map(|lang_item| self.tcx.lang_items().require(*lang_item).ok()) .collect(); - never_suggest_borrow.push(self.tcx.get_diagnostic_item(sym::send_trait).unwrap()); + never_suggest_borrow.push(self.tcx.get_diagnostic_item(sym::Send).unwrap()); let param_env = obligation.param_env; let trait_ref = trait_ref.skip_binder(); @@ -1634,8 +1634,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { // Special case the primary error message when send or sync is the trait that was // not implemented. - let is_send = self.tcx.is_diagnostic_item(sym::send_trait, trait_ref.def_id); - let is_sync = self.tcx.is_diagnostic_item(sym::sync_trait, trait_ref.def_id); + let is_send = self.tcx.is_diagnostic_item(sym::Send, trait_ref.def_id); + let is_sync = self.tcx.is_diagnostic_item(sym::Sync, trait_ref.def_id); let hir = self.tcx.hir(); let trait_explanation = if is_send || is_sync { let (trait_name, trait_verb) = |
