mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Add warn(unreachable_pub)
to rustc_ty_utils
.
This commit is contained in:
parent
3e09c450b4
commit
d7caea129d
@ -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]
|
||||
|
@ -16,6 +16,7 @@
|
||||
#![feature(let_chains)]
|
||||
#![feature(never_type)]
|
||||
#![feature(rustdoc_internals)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
use rustc_middle::query::Providers;
|
||||
|
Loading…
Reference in New Issue
Block a user