Skip to content

Commit a721d88

Browse files
Add possibility to match on both full target and components
1 parent cfc656c commit a721d88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

text/0000-cfg-target.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- Feature Name: `cfg-target`
22
- Start Date: 2020-09-27
3-
- RFC PR: [rust-lang/rfcs#2991](https://github.com/rust-lang/rfcs/pull/2991)
3+
- RFC PR: [rust-lang/rfcs#3239](https://github.com/rust-lang/rfcs/pull/3239)
44
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)
55

66
# Summary
@@ -36,6 +36,16 @@ mod mac_catalyst;
3636

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

39+
It would also support to specify each `target_*` inside a new `target`
40+
attribute as follows:
41+
42+
```rust
43+
// So we can for example rewrite:
44+
#[cfg(all(target_os = "linux", target_arch = "arm"))]
45+
// as:
46+
#[cfg(target(os = "linux", arch = "arm"))]
47+
```
48+
3949
# Reference-level explanation
4050
[reference-level-explanation]: #reference-level-explanation
4151

0 commit comments

Comments
 (0)