rust/compiler/rustc_span/src
Trevor Gross 743d2527a2
Rollup merge of #140367 - folkertdev:asm-cfg, r=nnethercote
add `asm_cfg`: `#[cfg(...)]` within `asm!`

tracking issue: https://github.com/rust-lang/rust/issues/140364
blocked on: https://github.com/rust-lang/rust/pull/140490

This feature was discussed in https://github.com/rust-lang/rust/issues/140279. It allows configuring templates and operands in the assembly macros, for example:

```rust
asm!( // or global_asm! or naked_asm!
    "nop",
    #[cfg(target_feature = "sse2")]
    "nop",
    // ...
    #[cfg(target_feature = "sse2")]
    a = const 123, // only used on sse2
);
```

r? `@tgross35`

cc `@traviscross` `@Amanieu`

Now builds on https://github.com/rust-lang/rust/pull/140490, which should be merged first.
2025-05-27 20:28:30 -04:00
..
analyze_source_file Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
edit_distance update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
source_map Take into-account -Zremap-path-scope when embedding filenames 2025-05-05 19:45:34 +02:00
symbol Allow drivers to supply a list of extra symbols to intern 2025-04-10 13:39:23 +00:00
analyze_source_file.rs Rename cfg_match! to cfg_select! 2025-05-20 21:16:23 +00:00
caching_source_map_view.rs tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
def_id.rs Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
edit_distance.rs Use abs_diff where applicable 2025-03-27 18:29:06 +00:00
edition.rs Unify the format of rustc cli flags 2025-04-24 12:54:40 +08:00
fatal_error.rs Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov 2023-11-09 00:39:02 +00:00
hygiene.rs Move in_external_macro to SyntaxContext 2025-04-28 20:14:58 -04:00
lib.rs Rename cfg_match! to cfg_select! 2025-05-20 21:16:23 +00:00
profiling.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
source_map.rs Take into-account -Zremap-path-scope when embedding filenames 2025-05-05 19:45:34 +02:00
span_encoding.rs Optimize the codegen for Span::from_expansion 2025-04-30 11:38:09 -04:00
symbol.rs Rollup merge of #140367 - folkertdev:asm-cfg, r=nnethercote 2025-05-27 20:28:30 -04:00
tests.rs add unstable support for outputting file checksums for use in cargo 2024-10-01 21:23:20 -06:00