Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ba032832
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba032832
编写于
8月 17, 2019
作者:
S
Simon Sapin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Doc nits
Co-Authored-By:
N
Ralf Jung
<
post@ralfj.de
>
上级
7a641f7c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
15 deletion
+15
-15
src/liballoc/boxed.rs
src/liballoc/boxed.rs
+4
-4
src/liballoc/rc.rs
src/liballoc/rc.rs
+5
-5
src/liballoc/sync.rs
src/liballoc/sync.rs
+5
-5
src/libcore/ptr/unique.rs
src/libcore/ptr/unique.rs
+1
-1
未找到文件。
src/liballoc/boxed.rs
浏览文件 @
ba032832
...
...
@@ -123,7 +123,7 @@ pub fn new(x: T) -> Box<T> {
box
x
}
/// Construct a new box with uninitialized contents.
/// Construct
s
a new box with uninitialized contents.
///
/// # Examples
///
...
...
@@ -161,7 +161,7 @@ pub fn pin(x: T) -> Pin<Box<T>> {
}
impl
<
T
>
Box
<
[
T
]
>
{
/// Construct a new boxed slice with uninitialized contents.
/// Construct
s
a new boxed slice with uninitialized contents.
///
/// # Examples
///
...
...
@@ -192,7 +192,7 @@ pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
}
impl
<
T
>
Box
<
mem
::
MaybeUninit
<
T
>>
{
/// Convert to `Box<T>`.
/// Convert
s
to `Box<T>`.
///
/// # Safety
///
...
...
@@ -228,7 +228,7 @@ pub unsafe fn assume_init(self) -> Box<T> {
}
impl
<
T
>
Box
<
[
mem
::
MaybeUninit
<
T
>
]
>
{
/// Convert to `Box<[T]>`.
/// Convert
s
to `Box<[T]>`.
///
/// # Safety
///
...
...
src/liballoc/rc.rs
浏览文件 @
ba032832
...
...
@@ -327,7 +327,7 @@ pub fn new(value: T) -> Rc<T> {
}))
}
/// Construct
a new Rc
with uninitialized contents.
/// Construct
s a new `Rc`
with uninitialized contents.
///
/// # Examples
///
...
...
@@ -409,7 +409,7 @@ pub fn try_unwrap(this: Self) -> Result<T, Self> {
}
impl
<
T
>
Rc
<
[
T
]
>
{
/// Construct a new reference-counted slice with uninitialized contents.
/// Construct
s
a new reference-counted slice with uninitialized contents.
///
/// # Examples
///
...
...
@@ -441,7 +441,7 @@ pub fn new_uninit_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
}
impl
<
T
>
Rc
<
mem
::
MaybeUninit
<
T
>>
{
/// Convert to `Rc<T>`.
/// Convert
s
to `Rc<T>`.
///
/// # Safety
///
...
...
@@ -480,7 +480,7 @@ pub unsafe fn assume_init(self) -> Rc<T> {
}
impl
<
T
>
Rc
<
[
mem
::
MaybeUninit
<
T
>
]
>
{
/// Convert to `Rc<[T]>`.
/// Convert
s
to `Rc<[T]>`.
///
/// # Safety
///
...
...
@@ -721,7 +721,7 @@ pub fn get_mut(this: &mut Self) -> Option<&mut T> {
///
/// Any other `Rc` or [`Weak`] pointers to the same value must not be dereferenced
/// for the duration of the returned borrow.
/// This is trivially the case if no such pointer exist,
/// This is trivially the case if no such pointer
s
exist,
/// for example immediately after `Rc::new`.
///
/// # Examples
...
...
src/liballoc/sync.rs
浏览文件 @
ba032832
...
...
@@ -311,7 +311,7 @@ pub fn new(data: T) -> Arc<T> {
Self
::
from_inner
(
Box
::
into_raw_non_null
(
x
))
}
/// Construct
a Arc box
with uninitialized contents.
/// Construct
s a new `Arc`
with uninitialized contents.
///
/// # Examples
///
...
...
@@ -393,7 +393,7 @@ pub fn try_unwrap(this: Self) -> Result<T, Self> {
}
impl
<
T
>
Arc
<
[
T
]
>
{
/// Construct a new reference-counted slice with uninitialized contents.
/// Construct
s
a new reference-counted slice with uninitialized contents.
///
/// # Examples
///
...
...
@@ -425,7 +425,7 @@ pub fn new_uninit_slice(len: usize) -> Arc<[mem::MaybeUninit<T>]> {
}
impl
<
T
>
Arc
<
mem
::
MaybeUninit
<
T
>>
{
/// Convert to `Arc<T>`.
/// Convert
s
to `Arc<T>`.
///
/// # Safety
///
...
...
@@ -464,7 +464,7 @@ pub unsafe fn assume_init(self) -> Arc<T> {
}
impl
<
T
>
Arc
<
[
mem
::
MaybeUninit
<
T
>
]
>
{
/// Convert to `Arc<[T]>`.
/// Convert
s
to `Arc<[T]>`.
///
/// # Safety
///
...
...
@@ -1106,7 +1106,7 @@ pub fn get_mut(this: &mut Self) -> Option<&mut T> {
///
/// Any other `Arc` or [`Weak`] pointers to the same value must not be dereferenced
/// for the duration of the returned borrow.
/// This is trivially the case if no such pointer exist,
/// This is trivially the case if no such pointer
s
exist,
/// for example immediately after `Arc::new`.
///
/// # Examples
...
...
src/libcore/ptr/unique.rs
浏览文件 @
ba032832
...
...
@@ -123,7 +123,7 @@ pub unsafe fn as_mut(&mut self) -> &mut T {
&
mut
*
self
.as_ptr
()
}
/// Cast to a pointer of another type
/// Cast
s
to a pointer of another type
#[inline]
pub
const
fn
cast
<
U
>
(
self
)
->
Unique
<
U
>
{
unsafe
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录