Skip to content

Commit

Permalink
Merge #452
Browse files Browse the repository at this point in the history
452: Support dynamically sized types r=jeehoonkang a=jeehoonkang

It supersedes #209 for supporting dynamically sized types (DST) in Crossbeam.  It's much cleaner and less intrusive than the previous attempts in that it doesn't introduce another `Atomic` type.  `Atomic<T>` is still there without significant changes.

The key idea is (1) instead of requiring the condition on `T: Sized`, (2) requiring `T: Pointable` that means an object of type `T` can be pointed to by a single word.  For instance, `Atomic` becomes: `pub struct Atomic<T: ?Sized + Pointable> { ... }`.

It is breaking the backward compatibility in that it ~~(1) increases the minimum required Rust version to 1.36 (for `MaybeUninit`) and (2)~~ now `const fn Atomic::null()` is Nightly only.

Co-authored-by: Jeehoon Kang <[email protected]>
  • Loading branch information
bors[bot] and jeehoonkang authored May 25, 2020
2 parents b660c5a + a949087 commit 4879038
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 140 deletions.
Loading

0 comments on commit 4879038

Please sign in to comment.