Files
rust/tests/ui/attributes
Jonathan Brouwer a886ffca9d Rollup merge of #159253 - asuto15:suggest-export-name, r=JonathanBrouwer
Add suggestions for using `#[export_name]` instead of `#[link_name]` on static

Fixes rust-lang/rust#159247.

This adds a suggestion for using `#[unsafe(export_name = "...")]` when `#[link_name = "..."]` is applied to a static.

It also handles the existing `#[unsafe(link_name = "...")]` form by replacing only the attribute name.

Tested with:

- `./x test tests/ui/attributes/link-name-on-static.rs`
- `./x test tests/ui/attributes/unsafe-link-name-on-static.rs`
2026-07-27 11:58:09 +02:00
..
2026-06-30 09:01:03 +00:00
2026-03-09 09:11:06 +00:00
…
2026-04-17 12:37:58 +02:00
2026-04-17 12:37:58 +02:00
2026-03-17 17:30:56 +01:00
2026-03-17 17:30:56 +01:00
2026-03-17 17:30:56 +01:00
2026-03-17 17:30:56 +01:00
2026-03-17 17:30:56 +01:00
2026-06-16 17:11:03 -05:00
2026-03-17 17:30:56 +01:00
2025-12-10 12:28:05 +01:00
2026-07-25 19:25:58 +02:00
2026-07-25 19:25:58 +02:00
2026-04-19 23:51:38 +05:30
2026-04-27 09:53:10 +02:00