Fix static string lints
This commit is contained in:
parent
eeb527602a
commit
0138513635
32 changed files with 491 additions and 200 deletions
|
@ -170,9 +170,7 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
if matches!(tcx.def_kind(def_id), DefKind::Static(_)
|
||||
if tcx.def_kind(tcx.local_parent(def_id)) == DefKind::ForeignMod) =>
|
||||
{
|
||||
tcx.sess
|
||||
.struct_span_err(span, "extern static is too large for the current architecture")
|
||||
.emit();
|
||||
tcx.sess.emit_err(errors::TooLargeStatic { span });
|
||||
return;
|
||||
}
|
||||
// Generic statics are rejected, but we still reach this case.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue