Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
38de102
Support eager and lazy methods for providing references and values
shepmaster Jul 21, 2022
260ec93
Add `Provider::{would_be_satisfied_by_value_of,would_be_satisfied_by_…
shepmaster Jul 22, 2022
81a583c
Try normalizing types without RevealAll in ParamEnv in mir validation
Noratrieb Aug 3, 2022
96d4137
Only normalize once in mir validator typechecker
Noratrieb Aug 6, 2022
c846a2a
Make `std::os::fd` public.
sunfishcode Jun 14, 2022
09bbc42
Update asrawfd.js.
sunfishcode Jun 22, 2022
bda1262
Clarify that the `fd` module is supported on Unix and WASI.
sunfishcode Jun 30, 2022
7d80510
Re-introduce `unstable` attributes.
sunfishcode Aug 23, 2022
b9d3f65
[drop tracking] Use parent expression for scope
eholk Aug 30, 2022
803e35a
Remove unneeded extra whitespace before where clause
GuillaumeGomez Aug 31, 2022
4304d1d
Update rustdoc tests
GuillaumeGomez Aug 31, 2022
b112bfe
Add rustdoc GUI test
GuillaumeGomez Aug 31, 2022
54645e8
set up rustc_metadata for SessionDiagnostics, port dependency_format.rs
CleanCut Aug 23, 2022
3ed9310
port native_libs.rs to SessionDiagnostics
CleanCut Aug 23, 2022
f7e462a
port encoder.rs to SessionDiagnostics
CleanCut Aug 23, 2022
32e1823
port creader.rs to SessionDiagnostics
CleanCut Aug 23, 2022
bd8e312
port fs.rs to SessionDiagnostics
CleanCut Aug 23, 2022
d0ba1fb
port of locator.rs to SessionDiagnostics, fix some of the errors
CleanCut Aug 24, 2022
0d65819
respond to review feedback: mainly eliminate as many conversions as p…
CleanCut Aug 26, 2022
30adfd6
port 5 new diagnostics that appeared in master
CleanCut Aug 27, 2022
f921f56
Use parent_iter instead of a find_parent_node loop
eholk Aug 31, 2022
a928255
Fix bad target name in Walkthrough
diminishedprime Aug 31, 2022
d8b572b
Tweaks to fuchsia doc walkthrough
andrewpollack Aug 31, 2022
eb14b5d
Rollup merge of #98368 - sunfishcode:sunfishcode/std-os-fd, r=joshtri…
Dylan-DPC Sep 1, 2022
fbe63c2
Rollup merge of #99583 - shepmaster:provider-plus-plus, r=yaahc
Dylan-DPC Sep 1, 2022
6a3a886
Rollup merge of #100121 - Nilstrieb:mir-validator-param-env, r=oli-obk
Dylan-DPC Sep 1, 2022
1116b4d
Rollup merge of #100928 - CleanCut:rustc_metadata_diagnostics, r=davi…
Dylan-DPC Sep 1, 2022
7298451
Rollup merge of #101217 - eholk:drop-tracking-73137, r=jyn514
Dylan-DPC Sep 1, 2022
4e07938
Rollup merge of #101245 - GuillaumeGomez:remove-unneeded-where-whites…
Dylan-DPC Sep 1, 2022
4c92e64
Rollup merge of #101251 - diminishedprime:patch-1, r=JohnTitor
Dylan-DPC Sep 1, 2022
8c9564e
Rollup merge of #101256 - andrewpollack:fuchsia-docs-adding, r=tmandry
Dylan-DPC Sep 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
port native_libs.rs to SessionDiagnostics
  • Loading branch information
CleanCut committed Aug 31, 2022
commit 3ed93107ff0f92a64391e3c0936fb17195d525aa
102 changes: 102 additions & 0 deletions compiler/rustc_error_messages/locales/en-US/metadata.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,105 @@ metadata_required_panic_strategy =

metadata_incompatible_panic_in_drop_strategy =
the crate `{$crate_name}` is compiled with the panic-in-drop strategy `{$found_strategy}` which is incompatible with this crate's strategy of `{$desired_strategy}`

metadata_multiple_names_in_link =
multiple `name` arguments in a single `#[link]` attribute

metadata_multiple_kinds_in_link =
multiple `kind` arguments in a single `#[link]` attribute

metadata_link_name_form =
link name must be of the form `name = "string"`

metadata_link_kind_form =
link kind must be of the form `kind = "string"`

metadata_link_modifiers_form =
link modifiers must be of the form `modifiers = "string"`

metadata_link_cfg_form =
link cfg must be of the form `cfg(/* predicate */)`

metadata_wasm_import_form =
wasm import module must be of the form `wasm_import_module = "string"`

metadata_empty_link_name =
link name must not be empty
.label = empty link name

metadata_link_framework_apple =
link kind `framework` is only supported on Apple targets

metadata_framework_only_windows =
link kind `raw-dylib` is only supported on Windows targets

metadata_unknown_link_kind =
unknown link kind `{$kind}`, expected one of: static, dylib, framework, raw-dylib
.label = unknown link kind

metadata_multiple_link_modifiers =
multiple `modifiers` arguments in a single `#[link]` attribute

metadata_multiple_cfgs =
multiple `cfg` arguments in a single `#[link]` attribute

metadata_link_cfg_single_predicate =
link cfg must have a single predicate argument

metadata_multiple_wasm_import =
multiple `wasm_import_module` arguments in a single `#[link]` attribute

metadata_unexpected_link_arg =
unexpected `#[link]` argument, expected one of: name, kind, modifiers, cfg, wasm_import_module, import_name_type

metadata_invalid_link_modifier =
invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed

metadata_multiple_modifiers =
multiple `{$modifier}` modifiers in a single `modifiers` argument

metadata_bundle_needs_static =
linking modifier `bundle` is only compatible with `static` linking kind

metadata_whole_archive_needs_static =
linking modifier `whole-archive` is only compatible with `static` linking kind

metadata_as_needed_compatibility =
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds

metadata_unknown_link_modifier =
unknown linking modifier `{$modifier}`, expected one of: bundle, verbatim, whole-archive, as-needed

metadata_incompatible_wasm_link =
`wasm_import_module` is incompatible with other arguments in `#[link]` attributes

metadata_link_requires_name =
`#[link]` attribute requires a `name = "string"` argument
.label = missing `name` argument

metadata_raw_dylib_no_nul =
link name must not contain NUL characters if link kind is `raw-dylib`

metadata_link_ordinal_raw_dylib =
`#[link_ordinal]` is only supported if link kind is `raw-dylib`

metadata_lib_framework_apple =
library kind `framework` is only supported on Apple targets

metadata_empty_renaming_target =
an empty renaming target was specified for library `{$lib_name}`

metadata_renaming_no_link =
renaming of the library `{$lib_name}` was specified, however this crate contains no `#[link(...)]` attributes referencing this library

metadata_multiple_renamings =
multiple renamings were specified for library `{$lib_name}`

metadata_no_link_mod_override =
overriding linking modifiers from command line is not supported

metadata_unsupported_abi_i686 =
ABI not supported by `#[link(kind = "raw-dylib")]` on i686

metadata_unsupported_abi =
ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
232 changes: 232 additions & 0 deletions compiler/rustc_metadata/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// use rustc_errors::ErrorGuaranteed;
use rustc_macros::SessionDiagnostic;
use rustc_span::Span;

#[derive(SessionDiagnostic)]
#[diag(metadata::rlib_required)]
Expand Down Expand Up @@ -50,3 +51,234 @@ pub struct IncompatiblePanicInDropStrategy {
pub found_strategy: String,
pub desired_strategy: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_names_in_link)]
pub struct MultipleNamesInLink {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_kinds_in_link)]
pub struct MultipleKindsInLink {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_name_form)]
pub struct LinkNameForm {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_kind_form)]
pub struct LinkKindForm {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_modifiers_form)]
pub struct LinkModifiersForm {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_cfg_form)]
pub struct LinkCfgForm {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::wasm_import_form)]
pub struct WasmImportForm {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::empty_link_name, code = "E0454")]
pub struct EmptyLinkName {
#[label]
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_framework_apple, code = "E0455")]
pub struct LinkFrameworkApple {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::framework_only_windows, code = "E0455")]
pub struct FrameworkOnlyWindows {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::unknown_link_kind, code = "E0458")]
pub struct UnknownLinkKind {
#[label]
#[primary_span]
pub span: Span,
pub kind: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_link_modifiers)]
pub struct MultipleLinkModifiers {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_cfgs)]
pub struct MultipleCfgs {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_cfg_single_predicate)]
pub struct LinkCfgSinglePredicate {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_wasm_import)]
pub struct MultipleWasmImport {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::unexpected_link_arg)]
pub struct UnexpectedLinkArg {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::invalid_link_modifier)]
pub struct InvalidLinkModifier {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_modifiers)]
pub struct MultipleModifiers {
#[primary_span]
pub span: Span,
pub modifier: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::bundle_needs_static)]
pub struct BundleNeedsStatic {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::whole_archive_needs_static)]
pub struct WholeArchiveNeedsStatic {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::as_needed_compatibility)]
pub struct AsNeededCompatibility {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::unknown_link_modifier)]
pub struct UnknownLinkModifier {
#[primary_span]
pub span: Span,
pub modifier: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::incompatible_wasm_link)]
pub struct IncompatibleWasmLink {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_requires_name, code = "E0459")]
pub struct LinkRequiresName {
#[label]
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::raw_dylib_no_nul)]
pub struct RawDylibNoNul {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::link_ordinal_raw_dylib)]
pub struct LinkOrdinalRawDylib {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::lib_framework_apple)]
pub struct LibFrameworkApple;

#[derive(SessionDiagnostic)]
#[diag(metadata::empty_renaming_target)]
pub struct EmptyRenamingTarget {
pub lib_name: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::renaming_no_link)]
pub struct RenamingNoLink {
pub lib_name: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::multiple_renamings)]
pub struct MultipleRenamings {
pub lib_name: String,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::no_link_mod_override)]
pub struct NoLinkModOverride {
#[primary_span]
pub span: Option<Span>,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::unsupported_abi_i686)]
pub struct UnsupportedAbiI686 {
#[primary_span]
pub span: Span,
}

#[derive(SessionDiagnostic)]
#[diag(metadata::unsupported_abi)]
pub struct UnsupportedAbi {
#[primary_span]
pub span: Span,
}
Loading