Skip to content

Allow crate link attributes to contain nested meta items #607

@brson

Description

@brson
Contributor

It's currently impossible to define a link attribute that has nested meta items, #[link(foo(bar))];, even though this is a valid way to write an attribute. There are unfinished branches in two methods, link::build_link_meta (that prevents translation), and attr::eq (that prevents the attribute from being matched in a use statement), that need to be filled in.

Unfortunately it's not possible to formulate a test case for this within the current test framework, so instead of writing potentially broken code, I've just made these scenarios fail.

Activity

added a commit that references this issue on Jul 1, 2011
added a commit that references this issue on Dec 12, 2017
added a commit that references this issue on Apr 23, 2020
dce794c
added a commit that references this issue on Mar 7, 2023
875b2ae
added a commit that references this issue on Jan 24, 2025
bbc5473
added a commit that references this issue on Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-linkageArea: linking into static, shared libraries and binaries

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @brson@nikomatsakis@pcwalton

      Issue actions

        Allow crate link attributes to contain nested meta items · Issue #607 · rust-lang/rust