diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-30 16:32:12 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-03 08:50:33 +1000 |
| commit | d7caea129d3703d3021d29d873fc87ef9a97602f (patch) | |
| tree | f44cb71fe86b31a9d37905ff4c43438f2ed7f89f /compiler/rustc_ty_utils/src/errors.rs | |
| parent | 3e09c450b418c7cf6d2ad54d989aa36bb20d9e80 (diff) | |
| download | rust-d7caea129d3703d3021d29d873fc87ef9a97602f.tar.gz rust-d7caea129d3703d3021d29d873fc87ef9a97602f.zip | |
Add `warn(unreachable_pub)` to `rustc_ty_utils`.
Diffstat (limited to 'compiler/rustc_ty_utils/src/errors.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/errors.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_ty_utils/src/errors.rs b/compiler/rustc_ty_utils/src/errors.rs index 42ecaaeafa9..5497d7d0bd2 100644 --- a/compiler/rustc_ty_utils/src/errors.rs +++ b/compiler/rustc_ty_utils/src/errors.rs @@ -7,14 +7,14 @@ use rustc_span::Span; #[derive(Diagnostic)] #[diag(ty_utils_needs_drop_overflow)] -pub struct NeedsDropOverflow<'tcx> { +pub(crate) struct NeedsDropOverflow<'tcx> { pub query_ty: Ty<'tcx>, } #[derive(Diagnostic)] #[diag(ty_utils_generic_constant_too_complex)] #[help] -pub struct GenericConstantTooComplex { +pub(crate) struct GenericConstantTooComplex { #[primary_span] pub span: Span, #[note(ty_utils_maybe_supported)] @@ -24,7 +24,7 @@ pub struct GenericConstantTooComplex { } #[derive(Subdiagnostic)] -pub enum GenericConstantTooComplexSub { +pub(crate) enum GenericConstantTooComplexSub { #[label(ty_utils_borrow_not_supported)] BorrowNotSupported(#[primary_span] Span), #[label(ty_utils_address_and_deref_not_supported)] @@ -71,40 +71,40 @@ pub enum GenericConstantTooComplexSub { #[derive(Diagnostic)] #[diag(ty_utils_unexpected_fnptr_associated_item)] -pub struct UnexpectedFnPtrAssociatedItem { +pub(crate) struct UnexpectedFnPtrAssociatedItem { #[primary_span] pub span: Span, } #[derive(Diagnostic)] #[diag(ty_utils_zero_length_simd_type)] -pub struct ZeroLengthSimdType<'tcx> { +pub(crate) struct ZeroLengthSimdType<'tcx> { pub ty: Ty<'tcx>, } #[derive(Diagnostic)] #[diag(ty_utils_multiple_array_fields_simd_type)] -pub struct MultipleArrayFieldsSimdType<'tcx> { +pub(crate) struct MultipleArrayFieldsSimdType<'tcx> { pub ty: Ty<'tcx>, } #[derive(Diagnostic)] #[diag(ty_utils_oversized_simd_type)] -pub struct OversizedSimdType<'tcx> { +pub(crate) struct OversizedSimdType<'tcx> { pub ty: Ty<'tcx>, pub max_lanes: u64, } #[derive(Diagnostic)] #[diag(ty_utils_non_primitive_simd_type)] -pub struct NonPrimitiveSimdType<'tcx> { +pub(crate) struct NonPrimitiveSimdType<'tcx> { pub ty: Ty<'tcx>, pub e_ty: Ty<'tcx>, } #[derive(Diagnostic)] #[diag(ty_utils_impl_trait_duplicate_arg)] -pub struct DuplicateArg<'tcx> { +pub(crate) struct DuplicateArg<'tcx> { pub arg: GenericArg<'tcx>, #[primary_span] #[label] @@ -115,7 +115,7 @@ pub struct DuplicateArg<'tcx> { #[derive(Diagnostic)] #[diag(ty_utils_impl_trait_not_param, code = E0792)] -pub struct NotParam<'tcx> { +pub(crate) struct NotParam<'tcx> { pub arg: GenericArg<'tcx>, #[primary_span] #[label] |
