Skip to content

Commit 1bb9b95

Browse files
committed
typos and nits
1 parent 51bed0f commit 1bb9b95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/0000-unsafe-aliased.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ struct UnsafeAliased<T: ?Sized> {
191191

192192
impl<T: ?Sized> !Send for UnsafeAliased<T> {}
193193

194-
impl<T> UnsafeCell<T> {
194+
impl<T: ?Sized> UnsafeAliased<T> {
195195
/// Constructs a new instance of `UnsafeCell` which will wrap the specified
196196
/// value.
197-
pub fn new(value: T) -> UnsafeAliased<T> {
197+
pub fn new(value: T) -> UnsafeAliased<T> where T: Sized {
198198
UnsafeAliased { value }
199199
}
200200

201-
pub fn into_inner(self) -> T {
201+
pub fn into_inner(self) -> T where T: Sized {
202202
self.value
203203
}
204204

@@ -290,7 +290,7 @@ Codegen and Miri changes:
290290

291291
- `UnsafeCell`: disables aliasing (and affects but does not fully disable dereferenceable) behind shared refs, i.e. `&UnsafeCell<T>` is special. `UnsafeCell<&T>` (by-val, fully owned) is not special at all and basically like `&T`; `&mut UnsafeCell<T>` is also not special.
292292
- `UnsafeAliased`: disables aliasing (and affects but does not fully disable dereferenceable) behind mutable refs, i.e. `&mut UnsafeAliased<T>` is special. `UnsafeAliased<&mut T>` (by-val, fully owned) is not special at all and basically like `&mut T`; `&UnsafeAliased<T>` is also not special.
293-
- [`MaybeDangling`](https://github.com/rust-lang/rfcs/pull/3336): disables aliasing and dereferencable *of all references (and boxes) directly inside it*, i.e. `MaybeDanling<&[mut] T>` is special. `&[mut] MaybeDangling<T>` is not special at all and basically like `&[mut] T`.
293+
- [`MaybeDangling`](https://github.com/rust-lang/rfcs/pull/3336): disables aliasing and dereferencable *of all references (and boxes) directly inside it*, i.e. `MaybeDangling<&[mut] T>` is special. `&[mut] MaybeDangling<T>` is not special at all and basically like `&[mut] T`.
294294

295295
# Drawbacks
296296
[drawbacks]: #drawbacks

0 commit comments

Comments
 (0)