2025-06-29 15:37:54 +02:00
|
|
|
//@ edition: 2024
|
|
|
|
|
#![no_std]
|
|
|
|
|
|
|
|
|
|
// Since the 2024 edition the link_section attribute must use the unsafe qualification.
|
|
|
|
|
// However, the unsafe qualification is not shown by rustdoc.
|
|
|
|
|
|
2025-06-20 02:48:15 +00:00
|
|
|
//@ count "$.index[?(@.name=='example')].attrs[*]" 1
|
|
|
|
|
//@ is "$.index[?(@.name=='example')].attrs[*].link_section" '".text"'
|
2025-06-29 15:37:54 +02:00
|
|
|
#[unsafe(link_section = ".text")]
|
|
|
|
|
pub extern "C" fn example() {}
|