diff options
| author | Bryanskiy <ivakin.kir@gmail.com> | 2024-09-30 21:07:36 +0300 |
|---|---|---|
| committer | Bryanskiy <ivakin.kir@gmail.com> | 2025-05-04 22:03:15 +0300 |
| commit | 14535312b522c0524dd94633cc6a49992b12cecd (patch) | |
| tree | f397262aa2e597623ac7dc9a721da0360398808d /compiler/rustc_passes/src/errors.rs | |
| parent | 62c5f58f57670ce65e7fec34f8c4ba00c27da2d9 (diff) | |
| download | rust-14535312b522c0524dd94633cc6a49992b12cecd.tar.gz rust-14535312b522c0524dd94633cc6a49992b12cecd.zip | |
Initial support for dynamically linked crates
Diffstat (limited to 'compiler/rustc_passes/src/errors.rs')
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index b1b4b9ee927..00682a9c7a7 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -1422,6 +1422,13 @@ pub(crate) struct IncorrectTarget<'a> { pub at_least: bool, } +#[derive(Diagnostic)] +#[diag(passes_incorrect_crate_type)] +pub(crate) struct IncorrectCrateType { + #[primary_span] + pub span: Span, +} + #[derive(LintDiagnostic)] #[diag(passes_useless_assignment)] pub(crate) struct UselessAssignment<'a> { @@ -1919,3 +1926,50 @@ pub(crate) struct UnsupportedAttributesInWhere { #[primary_span] pub span: MultiSpan, } + +#[derive(Diagnostic)] +pub(crate) enum UnexportableItem<'a> { + #[diag(passes_unexportable_item)] + Item { + #[primary_span] + span: Span, + descr: &'a str, + }, + + #[diag(passes_unexportable_generic_fn)] + GenericFn(#[primary_span] Span), + + #[diag(passes_unexportable_fn_abi)] + FnAbi(#[primary_span] Span), + + #[diag(passes_unexportable_type_repr)] + TypeRepr(#[primary_span] Span), + + #[diag(passes_unexportable_type_in_interface)] + TypeInInterface { + #[primary_span] + span: Span, + desc: &'a str, + ty: &'a str, + #[label] + ty_span: Span, + }, + + #[diag(passes_unexportable_priv_item)] + PrivItem { + #[primary_span] + span: Span, + #[note] + vis_note: Span, + vis_descr: &'a str, + }, + + #[diag(passes_unexportable_adt_with_private_fields)] + AdtWithPrivFields { + #[primary_span] + span: Span, + #[note] + vis_note: Span, + field_name: &'a str, + }, +} |
