検索
Results of 1 - 7 of about 7 for This (0.018 sec.)
- Atomics 11378
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
ntly just inherits C11's memory model for atomics. This is not due to this model being particularly excell...
ent or easy to understand. Indeed, this model is quite complex and known to have several f...
rch around C. Trying to fully explain the model in this book is fairly hopeless. It's defined in terms of...
it would be best if your program did x = 2; y = 3; This has inverted the order of events and completely el...
- https://man.plustar.jp/rust/nomicon/atomics.html - [similar]
- Drop Check 10796
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
t we never read dangling references. However up to this point we have only ever interacted with the outliv...
a to live exactly as long as 'b . At first glance, this seems to be a meaningless distinction. Nothing eve...
r gets dropped at the same time as another, right? This is why we used the following desugaring of let sta...
l order is not specified. Tuples aren't special in this regard; composite structures just don't guarantee...
- https://man.plustar.jp/rust/nomicon/dropck.html - [similar]
- Subtyping and Variance 10432
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
tains (outlives) relationship. We can even express this as a generic bound. Subtyping on lifetimes is in t...
" or "a outlives b"), then 'a is a subtype of 'b . This is a large source of confusion, because it seems i...
he bigger scope is a subtype of the smaller scope. This does in fact make sense, though. The intuitive rea...
son for this is that if you expect an &'a u8 , then it's totall...
- https://man.plustar.jp/rust/nomicon/subtyping.html - [similar]
- PhantomData 9360
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
d with a struct, but not actually part of a field. This most commonly occurs with lifetimes. For instance,...
t's body, it's unbounded . Because of the troubles this has historically caused, unbounded lifetimes and t...
refer to these types in the body. Correctly doing this is necessary to have correct variance and drop che...
cking. We do this using PhantomData , which is a special marker type...
- https://man.plustar.jp/rust/nomicon/phantom-data.html - [similar]
- print.html 8433
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
tains (outlives) relationship. We can even express this as a generic bound. Subtyping on lifetimes is in t...
" or "a outlives b"), then 'a is a subtype of 'b . This is a large source of confusion, because it seems i...
he bigger scope is a subtype of the smaller scope. This does in fact make sense, though. The intuitive rea...
son for this is that if you expect an &'a u8 , then it's totall...
- https://man.plustar.jp/rust/nomicon/print.html - [similar]
- Send and Sync 6652
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
. Unless these types use synchronization to manage this access, they are absolutely not thread safe. Rust...
captures this through the Send and Sync traits. A type is Send i...
right. First and foremost, they're unsafe traits . This means that they are unsafe to implement, and other...
nd and Sync are also automatically derived traits. This means that, unlike every other trait, if a type is...
- https://man.plustar.jp/rust/nomicon/send-and-sync.html - [similar]
- Final Code 6506
- はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ
...
{ fn new() -> Self { unsafe { // !0 is usize::MAX. This branch should be stripped at compile time. let cap...
> { unsafe { let iter = RawValIter::new(&self); // this is a mem::forget safety thing. If Drain is forgott...
leak the whole Vec's contents. Also we need to do this *eventually* // anyway, so why not do it now? self...
{ _buf: RawVec<T>, // we don't actually care about this. Just need it to live. iter: RawValIter<T>, } impl...
- https://man.plustar.jp/rust/nomicon/vec-final.html - [similar]
PREV
1
NEXT