Remove TyCtxt::node_span_lint usage from rustc_hir_analysis

This commit is contained in:
Guillaume Gomez
2026-03-05 16:22:25 +01:00
parent 140ad033e7
commit e1ee66935e
24 changed files with 329 additions and 189 deletions
+66 -33
View File
@@ -4,7 +4,7 @@
use rustc_abi::{ExternAbi, FieldIdx, ScalableElt};
use rustc_data_structures::unord::{UnordMap, UnordSet};
use rustc_errors::codes::*;
use rustc_errors::{EmissionGuarantee, MultiSpan};
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan};
use rustc_hir as hir;
use rustc_hir::attrs::ReprAttr::ReprPacked;
use rustc_hir::def::{CtorKind, DefKind};
@@ -12,6 +12,7 @@
use rustc_infer::infer::{RegionVariableOrigin, TyCtxtInferExt};
use rustc_infer::traits::{Obligation, ObligationCauseCode, WellFormedLoc};
use rustc_lint_defs::builtin::{REPR_TRANSPARENT_NON_ZST_FIELDS, UNSUPPORTED_CALLING_CONVENTIONS};
use rustc_macros::Diagnostic;
use rustc_middle::hir::nested_filter;
use rustc_middle::middle::resolve_bound_vars::ResolvedArg;
use rustc_middle::middle::stability::EvalResult;
@@ -53,6 +54,22 @@ fn add_abi_diag_help<T: EmissionGuarantee>(abi: ExternAbi, diag: &mut Diag<'_, T
}
pub fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: ExternAbi) {
struct UnsupportedCallingConventions {
abi: ExternAbi,
}
impl<'a> Diagnostic<'a, ()> for UnsupportedCallingConventions {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { abi } = self;
let mut lint = Diag::new(
dcx,
level,
format!("{abi} is not a supported ABI for the current target"),
);
add_abi_diag_help(abi, &mut lint);
lint
}
}
// FIXME: This should be checked earlier, e.g. in `rustc_ast_lowering`, as this
// currently only guards function imports, function definitions, and function pointer types.
// Functions in trait declarations can still use "deprecated" ABIs without any warning.
@@ -64,12 +81,12 @@ pub fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: ExternAbi
tcx.dcx().span_delayed_bug(span, format!("{abi} should be rejected in ast_lowering"));
}
AbiMapping::Deprecated(..) => {
tcx.node_span_lint(UNSUPPORTED_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message(format!(
"{abi} is not a supported ABI for the current target"
));
add_abi_diag_help(abi, lint);
});
tcx.emit_node_span_lint(
UNSUPPORTED_CALLING_CONVENTIONS,
hir_id,
span,
UnsupportedCallingConventions { abi },
);
}
}
}
@@ -174,6 +191,11 @@ fn check_union_fields(tcx: TyCtxt<'_>, span: Span, item_def_id: LocalDefId) -> b
/// Check that a `static` is inhabited.
fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
#[derive(Diagnostic)]
#[diag("static of uninhabited type")]
#[note("uninhabited statics cannot be initialized, and any access would be an immediate error")]
struct StaticOfUninhabitedType;
// Make sure statics are inhabited.
// Other parts of the compiler assume that there are no uninhabited places. In principle it
// would be enough to check this for `extern` statics, as statics with an initializer will
@@ -204,15 +226,11 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
}
};
if layout.is_uninhabited() {
tcx.node_span_lint(
tcx.emit_node_span_lint(
UNINHABITED_STATIC,
tcx.local_def_id_to_hir_id(def_id),
span,
|lint| {
lint.primary_message("static of uninhabited type");
lint
.note("uninhabited statics cannot be initialized, and any access would be an immediate error");
},
StaticOfUninhabitedType,
);
}
}
@@ -1637,6 +1655,39 @@ pub(super) fn check_packed_inner(
}
pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>) {
struct ZeroSizedFieldReprTransparentIncompatibility<'tcx> {
unsuited: UnsuitedInfo<'tcx>,
}
impl<'a, 'tcx> Diagnostic<'a, ()> for ZeroSizedFieldReprTransparentIncompatibility<'tcx> {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { unsuited } = self;
let (title, note) = match unsuited.reason {
UnsuitedReason::NonExhaustive => (
"external non-exhaustive types",
"is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.",
),
UnsuitedReason::PrivateField => (
"external types with private fields",
"contains private fields, so it could become non-zero-sized in the future.",
),
UnsuitedReason::ReprC => (
"`repr(C)` types",
"is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.",
),
};
Diag::new(
dcx,
level,
format!("zero-sized fields in `repr(transparent)` cannot contain {title}"),
)
.with_note(format!(
"this field contains `{field_ty}`, which {note}",
field_ty = unsuited.ty,
))
}
}
if !adt.repr().transparent() {
return;
}
@@ -1747,29 +1798,11 @@ fn check_unsuited<'tcx>(
// If there are any non-trivial fields, then there can be no non-exhaustive 1-zsts.
// Otherwise, it's only an issue if there's >1 non-exhaustive 1-zst.
if non_trivial_count > 0 || prev_unsuited_1zst {
tcx.node_span_lint(
tcx.emit_node_span_lint(
REPR_TRANSPARENT_NON_ZST_FIELDS,
tcx.local_def_id_to_hir_id(adt.did().expect_local()),
field.span,
|lint| {
let title = match unsuited.reason {
UnsuitedReason::NonExhaustive => "external non-exhaustive types",
UnsuitedReason::PrivateField => "external types with private fields",
UnsuitedReason::ReprC => "`repr(C)` types",
};
lint.primary_message(
format!("zero-sized fields in `repr(transparent)` cannot contain {title}"),
);
let note = match unsuited.reason {
UnsuitedReason::NonExhaustive => "is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.",
UnsuitedReason::PrivateField => "contains private fields, so it could become non-zero-sized in the future.",
UnsuitedReason::ReprC => "is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.",
};
lint.note(format!(
"this field contains `{field_ty}`, which {note}",
field_ty = unsuited.ty,
));
},
ZeroSizedFieldReprTransparentIncompatibility { unsuited },
);
} else {
prev_unsuited_1zst = true;
+1 -1
View File
@@ -77,7 +77,7 @@
pub use check::{check_abi, check_custom_abi};
use rustc_abi::VariantIdx;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
use rustc_errors::{Diag, ErrorGuaranteed, pluralize, struct_span_code_err};
use rustc_errors::{ErrorGuaranteed, pluralize, struct_span_code_err};
use rustc_hir::LangItem;
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::intravisit::Visitor;
@@ -1,10 +1,28 @@
use rustc_data_structures::unord::{ExtendUnord, UnordSet};
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, Level};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::LocalDefId;
use rustc_middle::ty::TyCtxt;
use rustc_session::lint;
use rustc_span::Span;
use tracing::debug;
struct UnusedImport<'tcx> {
tcx: TyCtxt<'tcx>,
span: Span,
}
impl<'a, 'tcx> Diagnostic<'a, ()> for UnusedImport<'tcx> {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { tcx, span } = self;
if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(span) {
Diag::new(dcx, level, format!("unused import: `{snippet}`"))
} else {
Diag::new(dcx, level, "unused import")
}
}
}
pub(super) fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
let mut used_trait_imports = UnordSet::<LocalDefId>::default();
@@ -31,12 +49,11 @@ pub(super) fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
continue;
}
let (path, _) = item.expect_use();
tcx.node_span_lint(lint::builtin::UNUSED_IMPORTS, item.hir_id(), path.span, |lint| {
if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(path.span) {
lint.primary_message(format!("unused import: `{snippet}`"));
} else {
lint.primary_message("unused import");
}
});
tcx.emit_node_span_lint(
lint::builtin::UNUSED_IMPORTS,
item.hir_id(),
path.span,
UnusedImport { tcx, span: path.span },
);
}
}
+18 -7
View File
@@ -22,7 +22,9 @@
use rustc_ast::Recovered;
use rustc_data_structures::assert_matches;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
use rustc_errors::{Applicability, Diag, DiagCtxtHandle, E0228, ErrorGuaranteed, StashKey};
use rustc_errors::{
Applicability, Diag, DiagCtxtHandle, Diagnostic, E0228, ErrorGuaranteed, Level, StashKey,
};
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::intravisit::{self, InferKind, Visitor, VisitorExt};
@@ -610,6 +612,19 @@ pub(super) fn lower_variant_ctor(tcx: TyCtxt<'_>, def_id: LocalDefId) {
}
pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: LocalDefId) {
struct ReprCIssue {
msg: &'static str,
}
impl<'a> Diagnostic<'a, ()> for ReprCIssue {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { msg } = self;
Diag::new(dcx, level, msg)
.with_note("`repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C")
.with_help("use `repr($int_ty)` instead to explicitly set the size of this enum")
}
}
let def = tcx.adt_def(def_id);
let repr_type = def.repr().discr_type();
let initial = repr_type.initial_discriminant(tcx);
@@ -659,15 +674,11 @@ pub(super) fn lower_enum_variant_types(tcx: TyCtxt<'_>, def_id: LocalDefId) {
} else {
"`repr(C)` enum discriminant does not fit into C `int`, and a previous discriminant does not fit into C `unsigned int`"
};
tcx.node_span_lint(
tcx.emit_node_span_lint(
rustc_session::lint::builtin::REPR_C_ENUMS_LARGER_THAN_INT,
tcx.local_def_id_to_hir_id(def_id),
span,
|d| {
d.primary_message(msg)
.note("`repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C")
.help("use `repr($int_ty)` instead to explicitly set the size of this enum");
}
ReprCIssue { msg },
);
}
}
@@ -1,6 +1,7 @@
use std::ops::ControlFlow;
use rustc_data_structures::assert_matches;
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, Level};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::LocalDefId;
use rustc_hir::intravisit::{self, Visitor, VisitorExt};
@@ -17,6 +18,17 @@
pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
use rustc_hir::*;
struct GenericParametersForbiddenHere {
msg: &'static str,
}
impl<'a> Diagnostic<'a, ()> for GenericParametersForbiddenHere {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { msg } = self;
Diag::new(dcx, level, msg)
}
}
// For an RPITIT, synthesize generics which are equal to the opaque's generics
// and parent fn's generics compressed into one list.
if let Some(ty::ImplTraitInTraitData::Trait { fn_def_id, opaque_def_id }) =
@@ -269,13 +281,11 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
match param_default_policy.expect("no policy for generic param default") {
ParamDefaultPolicy::Allowed => {}
ParamDefaultPolicy::FutureCompatForbidden => {
tcx.node_span_lint(
tcx.emit_node_span_lint(
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
param.hir_id,
param.span,
|lint| {
lint.primary_message(MESSAGE);
},
GenericParametersForbiddenHere { msg: MESSAGE },
);
}
ParamDefaultPolicy::Forbidden => {
@@ -2,11 +2,12 @@
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
use rustc_errors::codes::*;
use rustc_errors::{
Applicability, Diag, EmissionGuarantee, StashKey, Suggestions, struct_span_code_err,
Applicability, Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, StashKey,
Suggestions, struct_span_code_err,
};
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::DefId;
use rustc_hir::{self as hir, LangItem};
use rustc_hir::{self as hir, HirId, LangItem};
use rustc_lint_defs::builtin::{BARE_TRAIT_OBJECTS, UNUSED_ASSOCIATED_TYPE_BOUNDS};
use rustc_middle::ty::elaborate::ClauseWithSupertraitSpan;
use rustc_middle::ty::{
@@ -523,6 +524,30 @@ fn prohibit_or_lint_bare_trait_object_ty(
hir_id: hir::HirId,
hir_bounds: &[hir::PolyTraitRef<'tcx>],
) -> Option<ErrorGuaranteed> {
struct TraitObjectWithoutDyn<'a, 'tcx> {
span: Span,
hir_id: HirId,
sugg: Vec<(Span, String)>,
this: &'a dyn HirTyLowerer<'tcx>,
}
impl<'a, 'b, 'tcx> Diagnostic<'a, ()> for TraitObjectWithoutDyn<'b, 'tcx> {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { span, hir_id, sugg, this } = self;
let mut lint =
Diag::new(dcx, level, "trait objects without an explicit `dyn` are deprecated");
if span.can_be_used_for_suggestions() {
lint.multipart_suggestion(
"if this is a dyn-compatible trait, use `dyn`",
sugg,
Applicability::MachineApplicable,
);
}
this.maybe_suggest_blanket_trait_impl(span, hir_id, &mut lint);
lint
}
}
let tcx = self.tcx();
let [poly_trait_ref, ..] = hir_bounds else { return None };
@@ -606,17 +631,12 @@ fn prohibit_or_lint_bare_trait_object_ty(
}
Some(diag.emit())
} else {
tcx.node_span_lint(BARE_TRAIT_OBJECTS, hir_id, span, |lint| {
lint.primary_message("trait objects without an explicit `dyn` are deprecated");
if span.can_be_used_for_suggestions() {
lint.multipart_suggestion(
"if this is a dyn-compatible trait, use `dyn`",
sugg,
Applicability::MachineApplicable,
);
}
self.maybe_suggest_blanket_trait_impl(span, hir_id, lint);
});
tcx.emit_node_span_lint(
BARE_TRAIT_OBJECTS,
hir_id,
span,
TraitObjectWithoutDyn { span, hir_id, sugg, this: self },
);
None
}
}
@@ -1,6 +1,9 @@
use rustc_ast::ast::ParamKindOrd;
use rustc_errors::codes::*;
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, struct_span_code_err};
use rustc_errors::{
Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, Level, MultiSpan,
struct_span_code_err,
};
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::DefId;
use rustc_hir::{self as hir, GenericArg};
@@ -625,6 +628,17 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
args: &hir::GenericArgs<'_>,
position: GenericArgPosition,
) -> ExplicitLateBound {
struct LifetimeArgsIssue {
msg: &'static str,
}
impl<'a> Diagnostic<'a, ()> for LifetimeArgsIssue {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self { msg } = self;
Diag::new(dcx, level, msg)
}
}
let param_counts = def.own_counts();
if let Some(span_late) = def.has_late_bound_regions
@@ -644,13 +658,11 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
} else {
let mut multispan = MultiSpan::from_span(span);
multispan.push_span_label(span_late, note);
cx.tcx().node_span_lint(
cx.tcx().emit_node_span_lint(
LATE_BOUND_LIFETIME_ARGUMENTS,
args.args[0].hir_id(),
multispan,
|lint| {
lint.primary_message(msg);
},
LifetimeArgsIssue { msg },
);
}
@@ -27,7 +27,8 @@
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
use rustc_errors::codes::*;
use rustc_errors::{
Applicability, Diag, DiagCtxtHandle, ErrorGuaranteed, FatalError, struct_span_code_err,
Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, FatalError, Level,
struct_span_code_err,
};
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
use rustc_hir::def_id::{DefId, LocalDefId};
@@ -1481,6 +1482,54 @@ fn lower_type_relative_path(
span: Span,
mode: LowerTypeRelativePathMode,
) -> Result<TypeRelativePath<'tcx>, ErrorGuaranteed> {
struct AmbiguousAssocItem<'tcx> {
variant_def_id: DefId,
item_def_id: DefId,
span: Span,
segment_ident: Ident,
bound_def_id: DefId,
self_ty: Ty<'tcx>,
tcx: TyCtxt<'tcx>,
mode: LowerTypeRelativePathMode,
}
impl<'a, 'tcx> Diagnostic<'a, ()> for AmbiguousAssocItem<'tcx> {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
let Self {
variant_def_id,
item_def_id,
span,
segment_ident,
bound_def_id,
self_ty,
tcx,
mode,
} = self;
let mut lint = Diag::new(dcx, level, "ambiguous associated item");
let mut could_refer_to = |kind: DefKind, def_id, also| {
let note_msg = format!(
"`{}` could{} refer to the {} defined here",
segment_ident,
also,
tcx.def_kind_descr(kind, def_id)
);
lint.span_note(tcx.def_span(def_id), note_msg);
};
could_refer_to(DefKind::Variant, variant_def_id, "");
could_refer_to(mode.def_kind_for_diagnostics(), item_def_id, " also");
lint.span_suggestion(
span,
"use fully-qualified syntax",
format!("<{} as {}>::{}", self_ty, tcx.item_name(bound_def_id), segment_ident),
Applicability::MachineApplicable,
);
lint
}
}
debug!(%self_ty, ?segment.ident);
let tcx = self.tcx();
@@ -1556,33 +1605,21 @@ fn lower_type_relative_path(
let (item_def_id, args) = self.lower_assoc_item_path(span, item_def_id, segment, bound)?;
if let Some(variant_def_id) = variant_def_id {
tcx.node_span_lint(AMBIGUOUS_ASSOCIATED_ITEMS, qpath_hir_id, span, |lint| {
lint.primary_message("ambiguous associated item");
let mut could_refer_to = |kind: DefKind, def_id, also| {
let note_msg = format!(
"`{}` could{} refer to the {} defined here",
segment.ident,
also,
tcx.def_kind_descr(kind, def_id)
);
lint.span_note(tcx.def_span(def_id), note_msg);
};
could_refer_to(DefKind::Variant, variant_def_id, "");
could_refer_to(mode.def_kind_for_diagnostics(), item_def_id, " also");
lint.span_suggestion(
tcx.emit_node_span_lint(
AMBIGUOUS_ASSOCIATED_ITEMS,
qpath_hir_id,
span,
AmbiguousAssocItem {
variant_def_id,
item_def_id,
span,
"use fully-qualified syntax",
format!(
"<{} as {}>::{}",
self_ty,
tcx.item_name(bound.def_id()),
segment.ident
),
Applicability::MachineApplicable,
);
});
segment_ident: segment.ident,
bound_def_id: bound.def_id(),
self_ty,
tcx,
mode,
},
);
}
Ok(TypeRelativePath::AssocItem(item_def_id, args))
+4 -4
View File
@@ -162,9 +162,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "cdecl" is not a supported ABI for the current target
@@ -173,9 +173,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -183,9 +183,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -193,9 +193,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 25 previous errors; 4 warnings emitted
+4 -4
View File
@@ -144,9 +144,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "cdecl" is not a supported ABI for the current target
@@ -155,9 +155,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -165,9 +165,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -175,9 +175,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 22 previous errors; 4 warnings emitted
+4 -4
View File
@@ -156,9 +156,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "cdecl" is not a supported ABI for the current target
@@ -167,9 +167,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -177,9 +177,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -187,9 +187,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 24 previous errors; 4 warnings emitted
+4 -4
View File
@@ -156,9 +156,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "cdecl" is not a supported ABI for the current target
@@ -167,9 +167,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -177,9 +177,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -187,9 +187,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 24 previous errors; 4 warnings emitted
+4 -4
View File
@@ -138,9 +138,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "cdecl" is not a supported ABI for the current target
@@ -149,9 +149,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -159,9 +159,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -169,9 +169,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 21 previous errors; 4 warnings emitted
+9 -9
View File
@@ -106,9 +106,9 @@ warning: "stdcall" is not a supported ABI for the current target
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
warning: "stdcall" is not a supported ABI for the current target
@@ -117,9 +117,9 @@ warning: "stdcall" is not a supported ABI for the current target
LL | extern "stdcall" {}
| ^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: "stdcall-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:92:1
@@ -127,9 +127,9 @@ warning: "stdcall-unwind" is not a supported ABI for the current target
LL | extern "stdcall-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:100:17
@@ -137,9 +137,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
| ^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:105:1
@@ -147,9 +147,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "cdecl-unwind" is not a supported ABI for the current target
--> $DIR/unsupported.rs:108:1
@@ -157,9 +157,9 @@ warning: "cdecl-unwind" is not a supported ABI for the current target
LL | extern "cdecl-unwind" {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C-unwind"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C-unwind"` instead
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:137:1
@@ -167,9 +167,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" {}
| ^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
warning: "stdcall" is not a supported ABI for the current target
--> $DIR/unsupported.rs:78:1
@@ -177,9 +177,9 @@ warning: "stdcall" is not a supported ABI for the current target
LL | extern "stdcall" fn stdcall() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
warning: "cdecl" is not a supported ABI for the current target
--> $DIR/unsupported.rs:97:1
@@ -187,9 +187,9 @@ warning: "cdecl" is not a supported ABI for the current target
LL | extern "cdecl" fn cdecl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `extern "C"` instead
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: use `extern "C"` instead
error: aborting due to 17 previous errors; 9 warnings emitted
@@ -4,10 +4,10 @@ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigne
LL | A = 9223372036854775807, // i64::MAX
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
note: the lint level is defined here
--> $DIR/repr-c-big-discriminant1.rs:8:9
|
@@ -20,10 +20,10 @@ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigne
LL | A = -2147483649, // i32::MIN-1
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
error: `repr(C)` enum discriminant does not fit into C `unsigned int`, and a previous discriminant does not fit into C `int`
--> $DIR/repr-c-big-discriminant1.rs:36:5
@@ -31,10 +31,10 @@ error: `repr(C)` enum discriminant does not fit into C `unsigned int`, and a pre
LL | B = -1,
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
error: `repr(C)` enum discriminant does not fit into C `int`, and a previous discriminant does not fit into C `unsigned int`
--> $DIR/repr-c-big-discriminant1.rs:43:5
@@ -42,10 +42,10 @@ error: `repr(C)` enum discriminant does not fit into C `int`, and a previous dis
LL | A = 2147483648, // i32::MAX+1
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigned int`
--> $DIR/repr-c-big-discriminant1.rs:53:5
@@ -53,10 +53,10 @@ error: `repr(C)` enum discriminant does not fit into C `int` nor into C `unsigne
LL | A = I64_MAX as isize,
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
error: aborting due to 5 previous errors
@@ -4,10 +4,10 @@ error: `repr(C)` enum discriminant does not fit into C `int`, and a previous dis
LL | B, // +1
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
= note: `repr(C)` enums with big discriminants are non-portable, and their size in Rust might not match their size in C
= help: use `repr($int_ty)` instead to explicitly set the size of this enum
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #124403 <https://github.com/rust-lang/rust/issues/124403>
note: the lint level is defined here
--> $DIR/repr-c-big-discriminant2.rs:8:9
|
@@ -9,9 +9,9 @@ LL | |
LL | | }
| |_^
|
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
= note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default
error: ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
@@ -14,8 +14,6 @@ error: ambiguous associated item
LL | fn foo() -> Self::V { 0 }
| ^^^^^^^ help: use fully-qualified syntax: `<E as Tr1>::V`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
note: `V` could refer to the variant defined here
--> $DIR/future-incompatible-lint-group.rs:8:10
|
@@ -26,6 +24,8 @@ note: `V` could also refer to the associated type defined here
|
LL | type V;
| ^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
note: the lint level is defined here
--> $DIR/future-incompatible-lint-group.rs:6:9
|
@@ -218,7 +218,7 @@ warning: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct TransparentCustomZst(i32, ZeroSize);
| ^^^^^^^^
|
= note: this field contains `ZeroSize`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ZeroSize`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
+1 -1
View File
@@ -169,7 +169,7 @@ warning: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct TransparentCustomZst(i32, ZeroSize);
| ^^^^^^^^
|
= note: this field contains `ZeroSize`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ZeroSize`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
@@ -4,9 +4,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T5(Sized, Private);
| ^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -19,9 +19,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T6(Sized, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:54:23
@@ -29,9 +29,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T6a(Sized, <i32 as Trait>::Assoc); // normalizes to `NonExhaustive`
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:59:22
@@ -39,9 +39,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T7(Sized, NonExhaustiveEnum);
| ^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:64:22
@@ -49,9 +49,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T8(Sized, NonExhaustiveVariant);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external types with private fields
--> $DIR/repr-transparent-non-exhaustive.rs:69:22
@@ -59,9 +59,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T9(Sized, InternalIndirection<Private>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:74:23
@@ -69,9 +69,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T10(Sized, InternalIndirection<NonExhaustive>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:79:23
@@ -79,9 +79,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T11(Sized, InternalIndirection<NonExhaustiveEnum>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:84:23
@@ -89,9 +89,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T12(Sized, InternalIndirection<NonExhaustiveVariant>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external types with private fields
--> $DIR/repr-transparent-non-exhaustive.rs:89:23
@@ -99,9 +99,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T13(Sized, ExternalIndirection<Private>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:94:23
@@ -109,9 +109,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T14(Sized, ExternalIndirection<NonExhaustive>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:99:23
@@ -119,9 +119,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T15(Sized, ExternalIndirection<NonExhaustiveEnum>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:104:23
@@ -129,9 +129,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T16(Sized, ExternalIndirection<NonExhaustiveVariant>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:109:16
@@ -139,9 +139,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T17(NonExhaustive, Sized);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:114:31
@@ -149,9 +149,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T18(NonExhaustive, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external types with private fields
--> $DIR/repr-transparent-non-exhaustive.rs:119:31
@@ -159,9 +159,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T19(NonExhaustive, Private);
| ^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
--> $DIR/repr-transparent-non-exhaustive.rs:124:32
@@ -169,9 +169,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T19Flipped(Private, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
error: aborting due to 17 previous errors
@@ -182,9 +182,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T5(Sized, Private);
| ^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -198,9 +198,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T6(Sized, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -214,9 +214,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T6a(Sized, <i32 as Trait>::Assoc); // normalizes to `NonExhaustive`
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -230,9 +230,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T7(Sized, NonExhaustiveEnum);
| ^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -246,9 +246,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T8(Sized, NonExhaustiveVariant);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -262,9 +262,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T9(Sized, InternalIndirection<Private>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -278,9 +278,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T10(Sized, InternalIndirection<NonExhaustive>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -294,9 +294,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T11(Sized, InternalIndirection<NonExhaustiveEnum>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -310,9 +310,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T12(Sized, InternalIndirection<NonExhaustiveVariant>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -326,9 +326,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T13(Sized, ExternalIndirection<Private>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -342,9 +342,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T14(Sized, ExternalIndirection<NonExhaustive>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -358,9 +358,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T15(Sized, ExternalIndirection<NonExhaustiveEnum>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -374,9 +374,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T16(Sized, ExternalIndirection<NonExhaustiveVariant>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -390,9 +390,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T17(NonExhaustive, Sized);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -406,9 +406,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T18(NonExhaustive, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -422,9 +422,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external types wi
LL | pub struct T19(NonExhaustive, Private);
| ^^^^^^^
|
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `Private`, which contains private fields, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
@@ -438,9 +438,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain external non-exha
LL | pub struct T19Flipped(Private, NonExhaustive);
| ^^^^^^^^^^^^^
|
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
note: the lint level is defined here
--> $DIR/repr-transparent-non-exhaustive.rs:1:9
|
+6 -6
View File
@@ -4,9 +4,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T5(Sized, ReprC1Zst);
| ^^^^^^^^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
@@ -19,9 +19,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T6(ReprC1Zst, Sized);
| ^^^^^^^^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:28:15
@@ -29,9 +29,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T7(T1, Sized); // still wrong, even when the repr(C) is hidden inside another type
| ^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
error: aborting due to 3 previous errors
@@ -42,9 +42,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T5(Sized, ReprC1Zst);
| ^^^^^^^^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
@@ -58,9 +58,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T6(ReprC1Zst, Sized);
| ^^^^^^^^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
@@ -74,9 +74,9 @@ error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
LL | pub struct T7(T1, Sized); // still wrong, even when the repr(C) is hidden inside another type
| ^^
|
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
+4 -4
View File
@@ -4,9 +4,9 @@ error: static of uninhabited type
LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
| ^^^^^^^^^^^^^^^^^^
|
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
note: the lint level is defined here
--> $DIR/uninhabited-static.rs:2:9
|
@@ -19,9 +19,9 @@ error: static of uninhabited type
LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
error: static of uninhabited type
--> $DIR/uninhabited-static.rs:6:5
@@ -29,9 +29,9 @@ error: static of uninhabited type
LL | static VOID: Void;
| ^^^^^^^^^^^^^^^^^
|
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
error: static of uninhabited type
--> $DIR/uninhabited-static.rs:8:5
@@ -39,9 +39,9 @@ error: static of uninhabited type
LL | static NEVER: !;
| ^^^^^^^^^^^^^^^
|
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
= note: uninhabited statics cannot be initialized, and any access would be an immediate error
error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void`
--> $DIR/uninhabited-static.rs:12:31
@@ -4,8 +4,6 @@ error: ambiguous associated item
LL | fn f() -> Self::V { 0 }
| ^^^^^^^ help: use fully-qualified syntax: `<E as Tr>::V`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
note: `V` could refer to the variant defined here
--> $DIR/enum-variant-priority-lint-ambiguous_associated_items.rs:22:5
|
@@ -16,6 +14,8 @@ note: `V` could also refer to the associated type defined here
|
LL | type V;
| ^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57644 <https://github.com/rust-lang/rust/issues/57644>
= note: `#[deny(ambiguous_associated_items)]` (part of `#[deny(future_incompatible)]`) on by default
error: aborting due to 1 previous error