Skip to content

Commit 1f7dcc8

Browse files
committed
Auto merge of #145958 - Zalathar:rollup-ii9z77c, r=Zalathar
Rollup of 9 pull requests Successful merges: - #142727 (wasm: rm static mut) - #143193 (Port `#[link]` to the new attribute parsing infrastructure ) - #144864 (No source fixes) - #145913 (Add spin_loop hint for LoongArch) - #145926 (compiletest: Remove several remnants of the old libtest-based executor) - #145928 (Rename `Location::file_with_nul` to `file_as_c_str`) - #145930 (`const`ify (the unstable) `str::as_str`) - #145941 (Disable `integer_to_ptr_transmutes` suggestion for unsized types) - #145953 (Update `icu_list` to 2.0) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b416342 + 556d2fa commit 1f7dcc8

File tree

128 files changed

+2182
-1712
lines changed

Some content is hidden

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

128 files changed

+2182
-1712
lines changed

Cargo.lock

Lines changed: 50 additions & 185 deletions
Large diffs are not rendered by default.

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.workspace = true
2122
# tidy-alphabetical-end

compiler/rustc_attr_parsing/messages.ftl

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