On Borrow Checking

Timon Gehr timon.gehr at gmx.ch
Sun May 4 16:38:24 UTC 2025


On 5/4/25 18:35, Dukc wrote:
> On Sunday, 4 May 2025 at 11:02:27 UTC, Paul Backus wrote:
>>
>> This page is the first result on Google for "unsafe rust". The fact 
>> that you got this wrong shows very clearly that you have not done your 
>> homework on this topic.
> 
> I think you're a bit too fast with your judgement here.
> 
> While the unsafe keyword doesn't directly turn off the borrow checker, 
> it does let you to work your way around it. I don't know exactly how, 
> but I'm sure it's possible; it's a systems programming language after 
> all. Most likely it involves calling some sort of unsafe typecasting 
> function. I think this is what Walter means.

Well, in unsafe Rust you can use raw pointers that are not subject to 
lifetime checks.


More information about the Digitalmars-d mailing list