Fix static string lints
This commit is contained in:
parent
eeb527602a
commit
0138513635
32 changed files with 491 additions and 200 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue