Skip to content

linkage attribute can be applied to any item #128486

Closed
@oli-obk

Description

@oli-obk
Contributor

I tried this code:

#![feature(linkage)]
#[linkage = "external"]
type Foo = ();

I expected to see this happen: compilation failure because of attribute on an item where it makes no sense

Instead, this happened: compiled successfully

Meta

rustc --version --verbose:

1.82.0-nightly

2024-07-31 28a58f2fa7f0c46b8fab

cc #29603

see #128444 for where to fix this issue

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 1, 2024
added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Aug 1, 2024
added
A-attributesArea: Attributes (`#[…]`, `#![…]`)
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 1, 2024
s7tya

s7tya commented on Aug 8, 2024

@s7tya
Contributor

@rustbot claim

added a commit that references this issue on Aug 17, 2024

Rollup merge of rust-lang#128989 - s7tya:check-linkage-attribute-pos,…

30ac9b7
added a commit that references this issue on Aug 17, 2024

Rollup merge of rust-lang#128989 - s7tya:check-linkage-attribute-pos,…

cfeded4
added a commit that references this issue on Aug 17, 2024
34a0712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @oli-obk@fmease@rustbot@s7tya

    Issue actions

      `linkage` attribute can be applied to any item · Issue #128486 · rust-lang/rust