about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-02-11 01:02:43 -0500
committerGitHub <noreply@github.com>2025-02-11 01:02:43 -0500
commit94bf32e71977a08b113166fbc98f16dd095ef382 (patch)
tree2b043dd941ebfc62070b7d60e18e67ca1e7b8b65 /compiler/rustc_codegen_llvm/src
parent9f86dcca488a0f91f6ad5bd5917e50acffc51490 (diff)
parentf78099e618a0895619dd7a5a834cd95cfebdefe8 (diff)
downloadrust-94bf32e71977a08b113166fbc98f16dd095ef382.tar.gz
rust-94bf32e71977a08b113166fbc98f16dd095ef382.zip
Rollup merge of #136835 - compiler-errors:contracts-span-hack, r=celinval
Stop using span hack for contracts feature gating

The contracts machinery is a pretty straightforward case of an *external* feature using a (perma-unstable) *internal* feature within its implementation. There's no reason why it needs to be implemented any differently than other features by using global span tracking hacks to change whether the internals are gated behind the `contracts` or `contracts_internals` feature gate -- for the case of macro expansions we already have `allow_internal_unstable` for exactly this situation.

This PR changes the internal, perma-unstable AST syntax to use the `contracts_internals` gate always, and adjusts the macro expansion to use the right spans so that `allow_internal_unstable` works correctly.

As a follow-up, there's really no reason to have `contracts` be a *compiler feature* since it's at this point fully a *library feature*; the only reason it's a compiler feature today is so we can mark it as incomplete, but that seems like a weak reason. I didn't do anything in this PR for this.

r? ``@celinval``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions