Use the opaque_types_defined_by query to cheaply check for whether a hidden type may be registered for an opaque type
This commit is contained in:
parent
6ae803eedf
commit
4e92f761fe
17 changed files with 368 additions and 162 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Errors emitted by ty_utils
|
||||
|
||||
use rustc_macros::{Diagnostic, Subdiagnostic};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_middle::ty::{GenericArg, Ty};
|
||||
use rustc_span::Span;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -100,3 +100,25 @@ pub 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 arg: GenericArg<'tcx>,
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[note]
|
||||
pub opaque_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ty_utils_impl_trait_not_param)]
|
||||
pub struct NotParam<'tcx> {
|
||||
pub arg: GenericArg<'tcx>,
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[note]
|
||||
pub opaque_span: Span,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue