diff options
| author | Celina G. Val <celinval@amazon.com> | 2025-01-30 17:06:09 -0800 | 
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2025-02-03 13:55:15 -0800 | 
| commit | ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e (patch) | |
| tree | 1d4338ad613cc7b04680f8ed361c4920e1b4ae71 /compiler/rustc_builtin_macros/src/contracts.rs | |
| parent | 2c4923e6bc9608557f0bc59f975006e590fd337d (diff) | |
| download | rust-ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e.tar.gz rust-ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e.zip | |
Rename rustc_contract to contract
This has now been approved as a language feature and no longer needs a `rustc_` prefix. Also change the `contracts` feature to be marked as incomplete and `contracts_internals` as internal.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/contracts.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/contracts.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/compiler/rustc_builtin_macros/src/contracts.rs b/compiler/rustc_builtin_macros/src/contracts.rs index fbdd8af9954..85a30f7bdc9 100644 --- a/compiler/rustc_builtin_macros/src/contracts.rs +++ b/compiler/rustc_builtin_macros/src/contracts.rs @@ -123,7 +123,7 @@ fn expand_contract_clause( // Record the span as a contract attribute expansion. // This is used later to stop users from using the extended syntax directly - // which is gated via `rustc_contracts_internals`. + // which is gated via `contracts_internals`. ecx.psess().contract_attribute_spans.push(attr_span); Ok(new_tts) @@ -137,7 +137,7 @@ fn expand_requires_tts( ) -> Result<TokenStream, ErrorGuaranteed> { expand_contract_clause(_ecx, attr_span, annotated, |new_tts| { new_tts.push_tree(TokenTree::Token( - token::Token::from_ast_ident(Ident::new(kw::RustcContractRequires, attr_span)), + token::Token::from_ast_ident(Ident::new(kw::ContractRequires, attr_span)), Spacing::Joint, )); new_tts.push_tree(TokenTree::Token( @@ -162,7 +162,7 @@ fn expand_ensures_tts( ) -> Result<TokenStream, ErrorGuaranteed> { expand_contract_clause(_ecx, attr_span, annotated, |new_tts| { new_tts.push_tree(TokenTree::Token( - token::Token::from_ast_ident(Ident::new(kw::RustcContractEnsures, attr_span)), + token::Token::from_ast_ident(Ident::new(kw::ContractEnsures, attr_span)), Spacing::Joint, )); new_tts.push_tree(TokenTree::Delimited( | 
