Skip to content

Commit

Permalink
Add possibility to match on both full target and components
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 4, 2022
1 parent cfc656c commit a721d88
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion text/0000-cfg-target.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- Feature Name: `cfg-target`
- Start Date: 2020-09-27
- RFC PR: [rust-lang/rfcs#2991](https://github.com/rust-lang/rfcs/pull/2991)
- RFC PR: [rust-lang/rfcs#3239](https://github.com/rust-lang/rfcs/pull/3239)
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)

# Summary
Expand Down Expand Up @@ -36,6 +36,16 @@ mod mac_catalyst;

This includes `#[cfg_attr(target = "...", attr)]`.

It would also support to specify each `target_*` inside a new `target`
attribute as follows:

```rust
// So we can for example rewrite:
#[cfg(all(target_os = "linux", target_arch = "arm"))]
// as:
#[cfg(target(os = "linux", arch = "arm"))]
```

# Reference-level explanation
[reference-level-explanation]: #reference-level-explanation

Expand Down

0 comments on commit a721d88

Please sign in to comment.