<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/core/src/contracts.rs, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-10T23:32:56+00:00</updated>
<entry>
<title>Apply suggestions from code review</title>
<updated>2025-04-10T23:32:56+00:00</updated>
<author>
<name>Celina G. Val</name>
<email>celinval@amazon.com</email>
</author>
<published>2025-04-10T23:32:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=13f1c845840fa40135fbed8798ec42df4d93b5d3'/>
<id>urn:sha1:13f1c845840fa40135fbed8798ec42df4d93b5d3</id>
<content type='text'>
Co-authored-by: Ralf Jung &lt;post@ralfj.de&gt;</content>
</entry>
<entry>
<title>Fix unreachable expression warning</title>
<updated>2025-04-08T17:46:31+00:00</updated>
<author>
<name>Celina G. Val</name>
<email>celinval@amazon.com</email>
</author>
<published>2025-04-08T00:42:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3feac59b794acf326c0efebaabd500e47fc65ba9'/>
<id>urn:sha1:3feac59b794acf326c0efebaabd500e47fc65ba9</id>
<content type='text'>
Invert the order that we pass the arguments to the
`contract_check_ensures` function to avoid the warning when the tail
of the function is unreachable.

Note that the call itself is also unreachable, but we have already
handled that case by ignoring unreachable call for contract calls.
</content>
</entry>
<entry>
<title>Enable contracts for const functions</title>
<updated>2025-04-07T18:17:33+00:00</updated>
<author>
<name>Celina G. Val</name>
<email>celinval@amazon.com</email>
</author>
<published>2025-02-25T21:24:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b9754f9e7bfe2d8eed780962b550a25a87118ce4'/>
<id>urn:sha1:b9754f9e7bfe2d8eed780962b550a25a87118ce4</id>
<content type='text'>
Use `const_eval_select!()` macro to enable contract checking only at
runtime. The existing contract logic relies on closures,
which are not supported in constant functions.

This commit also removes one level of indirection for ensures clauses,
however, it currently has a spurious warning message when the bottom
of the function is unreachable.
</content>
</entry>
<entry>
<title>update `cfg(bootstrap)`</title>
<updated>2025-02-18T17:32:44+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2025-02-18T17:10:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3c45324e678d7148d542f08ced5c666dba2e1d60'/>
<id>urn:sha1:3c45324e678d7148d542f08ced5c666dba2e1d60</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename rustc_contract to contract</title>
<updated>2025-02-03T21:55:15+00:00</updated>
<author>
<name>Celina G. Val</name>
<email>celinval@amazon.com</email>
</author>
<published>2025-01-31T01:06:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e'/>
<id>urn:sha1:ddbf54b67d9befcf1fb90613d2a6f7f6aa03141e</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Improve contracts intrisics and remove wrapper function</title>
<updated>2025-02-03T21:55:15+00:00</updated>
<author>
<name>Celina G. Val</name>
<email>celinval@amazon.com</email>
</author>
<published>2025-01-17T22:49:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2bb1464cb6b46d175f92943cb0f9ab534e6cc6eb'/>
<id>urn:sha1:2bb1464cb6b46d175f92943cb0f9ab534e6cc6eb</id>
<content type='text'>
1. Document the new intrinsics.
2. Make the intrinsics actually check the contract if enabled, and
   remove `contract::check_requires` function.
3. Use panic with no unwind in case contract is using to check for
   safety, we probably don't want to unwind. Following the same
   reasoning as UB checks.
</content>
</entry>
<entry>
<title>Separate contract feature gates for the internal machinery</title>
<updated>2025-02-03T21:55:15+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2024-12-03T16:13:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a6c6b891bb0350b3f16abd3e84ff12dbd1b4c5b'/>
<id>urn:sha1:6a6c6b891bb0350b3f16abd3e84ff12dbd1b4c5b</id>
<content type='text'>
The extended syntax for function signature that includes contract clauses
should never be user exposed versus the interface we want to ship
externally eventually.
</content>
</entry>
<entry>
<title>Desugars contract into the internal AST extensions</title>
<updated>2025-02-03T21:54:32+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2024-12-03T02:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ae7eff0be5c4abae63c06851af14cfdf7fec3981'/>
<id>urn:sha1:ae7eff0be5c4abae63c06851af14cfdf7fec3981</id>
<content type='text'>
Check ensures on early return due to Try / Yeet

Expand these two expressions to include a call to contract checking
</content>
</entry>
<entry>
<title>contracts: added lang items that act as hooks for rustc-injected code to invoke.</title>
<updated>2025-02-03T20:54:00+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2024-12-02T21:16:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=777def87d58ee067e1df2e94a99fc099bcb15189'/>
<id>urn:sha1:777def87d58ee067e1df2e94a99fc099bcb15189</id>
<content type='text'>
see test for an example of the kind of injected code that is anticipated here.
</content>
</entry>
</feed>
