Skip to content

Commit 036a5ec

Browse files
committed
Auto merge of #145860 - jhpratt:rollup-w1oo0ci, r=jhpratt
Rollup of 12 pull requests Successful merges: - #143193 (Port `#[link]` to the new attribute parsing infrastructure ) - #144373 (remove deprecated Error::description in impls) - #144885 (Implement some more checks in `ptr_guaranteed_cmp`. ) - #145535 (make rustdoc::invalid_html_tags more robust) - #145766 (test(rustfmt): Verify frontmatter is preserved) - #145811 (Fix some minor issues in comments) - #145814 (Handle unwinding fatal errors in codegen workers) - #145815 (Wait for DPkg frontend lock when trying to remove packages) - #145821 (compiletest: if a compiler fails, show its output) - #145845 (Make `x test distcheck` self-contained) - #145847 (Don't show warnings from xcrun with -Zverbose-internals) - #145856 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 54c5812 + 838586a commit 036a5ec

File tree

125 files changed

+2776
-1838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+2776
-1838
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,6 +3480,7 @@ dependencies = [
34803480
"rustc_parse",
34813481
"rustc_session",
34823482
"rustc_span",
3483+
"rustc_target",
34833484
"thin-vec",
34843485
]
34853486

compiler/rustc_attr_parsing/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ rustc_macros = { path = "../rustc_macros" }
1717
rustc_parse = { path = "../rustc_parse" }
1818
rustc_session = { path = "../rustc_session" }
1919
rustc_span = { path = "../rustc_span" }
20+
rustc_target = { path = "../rustc_target" }
2021
thin-vec = "0.2.12"
2122
# tidy-alphabetical-end

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,55 @@ attr_parsing_invalid_meta_item = expected a literal (`1u8`, `1.0f32`, `"string"`
189189
190190
attr_parsing_suffixed_literal_in_attribute = suffixed literals are not allowed in attributes
191191
.help = instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
192+
193+
attr_parsing_as_needed_compatibility =
194+
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds
195+
196+
attr_parsing_bundle_needs_static =
197+
linking modifier `bundle` is only compatible with `static` linking kind
198+
199+
attr_parsing_empty_link_name =
200+
link name must not be empty
201+
.label = empty link name
202+
203+
attr_parsing_import_name_type_raw =
204+
import name type can only be used with link kind `raw-dylib`
205+
206+
attr_parsing_import_name_type_x86 =
207+
import name type is only supported on x86
208+
209+
attr_parsing_incompatible_wasm_link =
210+
`wasm_import_module` is incompatible with other arguments in `#[link]` attributes
211+
212+
attr_parsing_invalid_link_modifier =
213+
invalid linking modifier syntax, expected '+' or '-' prefix before one of: bundle, verbatim, whole-archive, as-needed
214+
215+
attr_parsing_link_arg_unstable =
216+
link kind `link-arg` is unstable
217+
218+
attr_parsing_link_cfg_unstable =
219+
link cfg is unstable
220+
221+
attr_parsing_link_framework_apple =
222+
link kind `framework` is only supported on Apple targets
223+
224+
attr_parsing_link_requires_name =
225+
`#[link]` attribute requires a `name = "string"` argument
226+
.label = missing `name` argument
227+
228+
attr_parsing_multiple_modifiers =
229+
multiple `{$modifier}` modifiers in a single `modifiers` argument
230+
231+
attr_parsing_multiple_renamings =
232+
multiple renamings were specified for library `{$lib_name}`
233+
attr_parsing_raw_dylib_no_nul =
234+
link name must not contain NUL characters if link kind is `raw-dylib`
235+
236+
attr_parsing_raw_dylib_elf_unstable =
237+
link kind `raw-dylib` is unstable on ELF platforms
238+
239+
attr_parsing_raw_dylib_only_windows =
240+
link kind `raw-dylib` is only supported on Windows targets
241+
242+
attr_parsing_whole_archive_needs_static =
243+
linking modifier `whole-archive` is only compatible with `static` linking kind

compiler/rustc_attr_parsing/src/attributes/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn parse_cfg_attr<'c, S: Stage>(
3636
parse_cfg_entry(cx, single)
3737
}
3838

39-
fn parse_cfg_entry<S: Stage>(
39+
pub(crate) fn parse_cfg_entry<S: Stage>(
4040
cx: &mut AcceptContext<'_, '_, S>,
4141
item: &MetaItemOrLitParser<'_>,
4242
) -> Option<CfgEntry> {

0 commit comments

Comments
 (0)