Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8e009bc4
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,发现更多精彩内容 >>
提交
8e009bc4
编写于
8月 21, 2020
作者:
L
LeSeulArtichaut
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use intra-doc-links in `core::ops::*`
上级
33236911
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
27 addition
and
45 deletion
+27
-45
library/core/src/ops/deref.rs
library/core/src/ops/deref.rs
+0
-2
library/core/src/ops/drop.rs
library/core/src/ops/drop.rs
+8
-8
library/core/src/ops/function.rs
library/core/src/ops/function.rs
+0
-6
library/core/src/ops/index.rs
library/core/src/ops/index.rs
+1
-5
library/core/src/ops/mod.rs
library/core/src/ops/mod.rs
+1
-7
library/core/src/ops/range.rs
library/core/src/ops/range.rs
+16
-16
library/core/src/ops/unsize.rs
library/core/src/ops/unsize.rs
+1
-1
未找到文件。
library/core/src/ops/deref.rs
浏览文件 @
8e009bc4
...
...
@@ -28,7 +28,6 @@
/// [method resolution] and [type coercions].
///
/// [book]: ../../book/ch15-02-deref.html
/// [`DerefMut`]: trait.DerefMut.html
/// [more]: #more-on-deref-coercion
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
/// [method resolution]: ../../reference/expressions/method-call-expr.html
...
...
@@ -125,7 +124,6 @@ fn deref(&self) -> &T {
/// [method resolution] and [type coercions].
///
/// [book]: ../../book/ch15-02-deref.html
/// [`Deref`]: trait.Deref.html
/// [more]: #more-on-deref-coercion
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
/// [method resolution]: ../../reference/expressions/method-call-expr.html
...
...
library/core/src/ops/drop.rs
浏览文件 @
8e009bc4
...
...
@@ -78,9 +78,9 @@
///
/// In other words, if you tried to explicitly call `Drop::drop` in the above example, you'd get a compiler error.
///
/// If you'd like explicitly call the destructor of a value, [`
std::
mem::drop`] can be used instead.
/// If you'd like explicitly call the destructor of a value, [`mem::drop`] can be used instead.
///
/// [`
std::mem::drop`]: ../../std/mem/fn.drop.html
/// [`
mem::drop`]: crate::mem::drop
///
/// ## Drop order
///
...
...
@@ -133,7 +133,7 @@
/// hard to predict when, and how often destructors will be executed. As such,
/// these types cannot have destructors.
///
/// [`Copy`]:
../../std/marker/trait.Copy.html
/// [`Copy`]:
crate::marker::Copy
#[lang
=
"drop"
]
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
trait
Drop
{
...
...
@@ -141,7 +141,7 @@ pub trait Drop {
///
/// This method is called implicitly when the value goes out of scope,
/// and cannot be called explicitly (this is compiler error [E0040]).
/// However, the [`
std::
mem::drop`] function in the prelude can be
/// However, the [`mem::drop`] function in the prelude can be
/// used to call the argument's `Drop` implementation.
///
/// When this method has been called, `self` has not yet been deallocated.
...
...
@@ -156,12 +156,12 @@ pub trait Drop {
/// Note that even if this panics, the value is considered to be dropped;
/// you must not cause `drop` to be called again. This is normally automatically
/// handled by the compiler, but when using unsafe code, can sometimes occur
/// unintentionally, particularly when using [`
std::
ptr::drop_in_place`].
/// unintentionally, particularly when using [`ptr::drop_in_place`].
///
/// [E0040]: ../../error-index.html#E0040
/// [`panic!`]:
../macro.panic.html
/// [`
std::mem::drop`]: ../../std/mem/fn.drop.html
/// [`
std::ptr::drop_in_place`]: ../../std/ptr/fn.drop_in_place.html
/// [`panic!`]:
crate::panic!
/// [`
mem::drop`]: crate::mem::drop
/// [`
ptr::drop_in_place`]: crate::ptr::drop_in_place
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
fn
drop
(
&
mut
self
);
}
library/core/src/ops/function.rs
浏览文件 @
8e009bc4
...
...
@@ -28,8 +28,6 @@
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/ch13-01-closures.html
/// [`FnMut`]: trait.FnMut.html
/// [`FnOnce`]: trait.FnOnce.html
/// [function pointers]: ../../std/primitive.fn.html
/// [nomicon]: ../../nomicon/hrtb.html
///
...
...
@@ -99,8 +97,6 @@ pub trait Fn<Args>: FnMut<Args> {
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/ch13-01-closures.html
/// [`Fn`]: trait.Fn.html
/// [`FnOnce`]: trait.FnOnce.html
/// [function pointers]: ../../std/primitive.fn.html
/// [nomicon]: ../../nomicon/hrtb.html
///
...
...
@@ -180,8 +176,6 @@ pub trait FnMut<Args>: FnOnce<Args> {
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
///
/// [book]: ../../book/ch13-01-closures.html
/// [`Fn`]: trait.Fn.html
/// [`FnMut`]: trait.FnMut.html
/// [function pointers]: ../../std/primitive.fn.html
/// [nomicon]: ../../nomicon/hrtb.html
///
...
...
library/core/src/ops/index.rs
浏览文件 @
8e009bc4
...
...
@@ -4,9 +4,7 @@
/// but only when used as an immutable value. If a mutable value is requested,
/// [`IndexMut`] is used instead. This allows nice things such as
/// `let value = v[index]` if the type of `value` implements [`Copy`].
///
/// [`IndexMut`]: ../../std/ops/trait.IndexMut.html
/// [`Copy`]: ../../std/marker/trait.Copy.html
/// [`Copy`]: crate::marker::Copy
///
/// # Examples
///
...
...
@@ -76,8 +74,6 @@ pub trait Index<Idx: ?Sized> {
/// an immutable value is requested, the [`Index`] trait is used instead. This
/// allows nice things such as `v[index] = value`.
///
/// [`Index`]: ../../std/ops/trait.Index.html
///
/// # Examples
///
/// A very simple implementation of a `Balance` struct that has two sides, where
...
...
library/core/src/ops/mod.rs
浏览文件 @
8e009bc4
...
...
@@ -133,13 +133,7 @@
//! // `consume_and_return_x` can no longer be invoked at this point
//! ```
//!
//! [`Fn`]: trait.Fn.html
//! [`FnMut`]: trait.FnMut.html
//! [`FnOnce`]: trait.FnOnce.html
//! [`Add`]: trait.Add.html
//! [`Sub`]: trait.Sub.html
//! [`Mul`]: trait.Mul.html
//! [`clone`]: ../clone/trait.Clone.html#tymethod.clone
//! [`clone`]: crate::clone::Clone::clone
//! [operator precedence]: ../../reference/expressions.html#expression-precedence
#![stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
...
...
library/core/src/ops/range.rs
浏览文件 @
8e009bc4
...
...
@@ -35,9 +35,9 @@
/// assert_eq!(arr[1..=3], [ 1,2,3 ]);
/// ```
///
/// [`IntoIterator`]:
../iter/trait.Iterator.html
/// [`Iterator`]:
../iter/trait.IntoIterator.html
/// [slicing index]:
../slice/trait.SliceIndex.html
/// [`IntoIterator`]:
crate::iter::IntoIterator
/// [`Iterator`]:
crate::iter::Iterator
/// [slicing index]:
crate::slice::SliceIndex
#[cfg_attr(not(bootstrap),
lang
=
"RangeFull"
)]
#[doc(alias
=
".."
)]
#[derive(Copy,
Clone,
Default,
PartialEq,
Eq,
Hash)]
...
...
@@ -179,7 +179,7 @@ pub fn is_empty(&self) -> bool {
/// assert_eq!(arr[1..=3], [ 1,2,3 ]);
/// ```
///
/// [`Iterator`]:
../iter/trait.IntoIterator.html
/// [`Iterator`]:
crate::iter::IntoIterator
#[cfg_attr(not(bootstrap),
lang
=
"RangeFrom"
)]
#[doc(alias
=
".."
)]
#[derive(Clone,
PartialEq,
Eq,
Hash)]
// not Copy -- see #27186
...
...
@@ -260,9 +260,9 @@ pub fn contains<U>(&self, item: &U) -> bool
/// assert_eq!(arr[1..=3], [ 1,2,3 ]);
/// ```
///
/// [`IntoIterator`]:
../iter/trait.Iterator.html
/// [`Iterator`]:
../iter/trait.IntoIterator.html
/// [slicing index]:
../slice/trait.SliceIndex.html
/// [`IntoIterator`]:
crate::iter::IntoIterator
/// [`Iterator`]:
crate::iter::Iterator
/// [slicing index]:
crate::slice::SliceIndex
#[cfg_attr(not(bootstrap),
lang
=
"RangeTo"
)]
#[doc(alias
=
".."
)]
#[derive(Copy,
Clone,
PartialEq,
Eq,
Hash)]
...
...
@@ -315,8 +315,8 @@ pub fn contains<U>(&self, item: &U) -> bool
/// iteration has finished are **unspecified** other than that [`.is_empty()`]
/// will return `true` once no more values will be produced.
///
/// [fused]:
../iter/trait.FusedIterator.html
/// [`.is_empty()`]:
#method.
is_empty
/// [fused]:
crate::iter::FusedIterator
/// [`.is_empty()`]:
RangeInclusive::
is_empty
///
/// # Examples
///
...
...
@@ -383,8 +383,8 @@ pub const fn new(start: Idx, end: Idx) -> Self {
/// Note: the value returned by this method is unspecified after the range
/// has been iterated to exhaustion.
///
/// [`end()`]:
#method.
end
/// [`is_empty()`]:
#method.
is_empty
/// [`end()`]:
RangeInclusive::
end
/// [`is_empty()`]:
RangeInclusive::
is_empty
///
/// # Examples
///
...
...
@@ -408,8 +408,8 @@ pub const fn start(&self) -> &Idx {
/// Note: the value returned by this method is unspecified after the range
/// has been iterated to exhaustion.
///
/// [`start()`]:
#method.
start
/// [`is_empty()`]:
#method.
is_empty
/// [`start()`]:
RangeInclusive::
start
/// [`is_empty()`]:
RangeInclusive::
is_empty
///
/// # Examples
///
...
...
@@ -558,9 +558,9 @@ pub fn is_empty(&self) -> bool {
/// assert_eq!(arr[1..=3], [ 1,2,3 ]);
/// ```
///
/// [`IntoIterator`]:
../iter/trait.Iterator.html
/// [`Iterator`]:
../iter/trait.IntoIterator.html
/// [slicing index]:
../slice/trait.SliceIndex.html
/// [`IntoIterator`]:
crate::iter::IntoIterator
/// [`Iterator`]:
crate::iter::Iterator
/// [slicing index]:
crate::slice::SliceIndex
#[cfg_attr(not(bootstrap),
lang
=
"RangeToInclusive"
)]
#[doc(alias
=
"..="
)]
#[derive(Copy,
Clone,
PartialEq,
Eq,
Hash)]
...
...
library/core/src/ops/unsize.rs
浏览文件 @
8e009bc4
...
...
@@ -29,7 +29,7 @@
/// pointers. It is implemented automatically by the compiler.
///
/// [dst-coerce]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
/// [unsize]:
../marker/trait.Unsize.html
/// [unsize]:
crate::marker::Unsize
/// [nomicon-coerce]: ../../nomicon/coercions.html
#[unstable(feature
=
"coerce_unsized"
,
issue
=
"27732"
)]
#[lang
=
"coerce_unsized"
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录