diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-04-10 16:04:14 +0100 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-04-25 18:59:55 +0100 |
| commit | 01385136353ac35f16d10bf5890bf0efc80df761 (patch) | |
| tree | 5832418294e182550a3f42b6ca462515ca0872da /compiler/rustc_hir_analysis/src/coherence/mod.rs | |
| parent | eeb527602a0293337752f9dc0c63eca3990d8e4e (diff) | |
| download | rust-01385136353ac35f16d10bf5890bf0efc80df761.tar.gz rust-01385136353ac35f16d10bf5890bf0efc80df761.zip | |
Fix static string lints
Diffstat (limited to 'compiler/rustc_hir_analysis/src/coherence/mod.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/coherence/mod.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_hir_analysis/src/coherence/mod.rs b/compiler/rustc_hir_analysis/src/coherence/mod.rs index ac393ee15a6..cd2ec2bef20 100644 --- a/compiler/rustc_hir_analysis/src/coherence/mod.rs +++ b/compiler/rustc_hir_analysis/src/coherence/mod.rs @@ -5,6 +5,7 @@ // done by the orphan and overlap modules. Then we build up various // mappings. That mapping code resides here. +use crate::errors; use rustc_errors::{error_code, struct_span_err}; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_middle::ty::query::Providers; @@ -67,13 +68,7 @@ fn enforce_trait_manually_implementable( tcx.trait_def(trait_def_id).specialization_kind { if !tcx.features().specialization && !tcx.features().min_specialization { - tcx.sess - .struct_span_err( - impl_header_span, - "implementing `rustc_specialization_trait` traits is unstable", - ) - .help("add `#![feature(min_specialization)]` to the crate attributes to enable") - .emit(); + tcx.sess.emit_err(errors::SpecializationTrait { span: impl_header_span }); return; } } |
