# Ability to detect profiles

**URL:** <https://internals.rust-lang.org/t/ability-to-detect-profiles/19794>\
**Category:** compiler\
**Created:** [November 1, 2023, 11:10am UTC](https://internals.rust-lang.org/t/ability-to-detect-profiles/19794 "2023-11-01T11:10:39Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![epage](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/epage/32/3171_2.png) [@epage](https://internals.rust-lang.org/u/epage)\
**Post date:** [November 2, 2023, 1:44am UTC](https://internals.rust-lang.org/t/ability-to-detect-profiles/19794/5 "2023-11-02T01:44:36Z")

</div>

Since profiles are at the workspace level, it would be very limited what features they can enable.

This also, to me, is a reason against making `cfg`s for profiles like this as it very much limits where the profiles can be detected. This would also likely not play well with the `--check-cfg` feature.

Now, [global features](https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618) might do the trick 😉

---

_[View the full topic](https://internals.rust-lang.org/t/ability-to-detect-profiles/19794)._
