Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
47cb3c5b
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,发现更多精彩内容 >>
提交
47cb3c5b
编写于
8月 11, 2017
作者:
B
Bastien Orivel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix some typos
上级
2ac5f7d2
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
24 addition
and
24 deletion
+24
-24
src/liballoc/allocator.rs
src/liballoc/allocator.rs
+1
-1
src/liballoc/btree/node.rs
src/liballoc/btree/node.rs
+2
-2
src/libcore/iter/mod.rs
src/libcore/iter/mod.rs
+1
-1
src/libcore/iter/traits.rs
src/libcore/iter/traits.rs
+1
-1
src/libcore/num/dec2flt/algorithm.rs
src/libcore/num/dec2flt/algorithm.rs
+1
-1
src/libcore/tests/num/mod.rs
src/libcore/tests/num/mod.rs
+1
-1
src/librustc/traits/specialize/specialization_graph.rs
src/librustc/traits/specialize/specialization_graph.rs
+1
-1
src/librustc/ty/adjustment.rs
src/librustc/ty/adjustment.rs
+2
-2
src/librustc_data_structures/stable_hasher.rs
src/librustc_data_structures/stable_hasher.rs
+1
-1
src/librustc_mir/dataflow/impls/mod.rs
src/librustc_mir/dataflow/impls/mod.rs
+1
-1
src/librustc_mir/hair/mod.rs
src/librustc_mir/hair/mod.rs
+1
-1
src/librustc_trans/base.rs
src/librustc_trans/base.rs
+1
-1
src/librustc_typeck/check/dropck.rs
src/librustc_typeck/check/dropck.rs
+1
-1
src/librustc_typeck/constrained_type_params.rs
src/librustc_typeck/constrained_type_params.rs
+1
-1
src/librustc_typeck/variance/constraints.rs
src/librustc_typeck/variance/constraints.rs
+1
-1
src/librustdoc/clean/inline.rs
src/librustdoc/clean/inline.rs
+1
-1
src/libstd/panic.rs
src/libstd/panic.rs
+1
-1
src/libstd/sys/redox/syscall/call.rs
src/libstd/sys/redox/syscall/call.rs
+2
-2
src/libstd/thread/mod.rs
src/libstd/thread/mod.rs
+1
-1
src/libsyntax/attr.rs
src/libsyntax/attr.rs
+1
-1
src/libsyntax/parse/mod.rs
src/libsyntax/parse/mod.rs
+1
-1
未找到文件。
src/liballoc/allocator.rs
浏览文件 @
47cb3c5b
...
...
@@ -40,7 +40,7 @@ fn size_align<T>() -> (usize, usize) {
///
/// (Note however that layouts are *not* required to have positive
/// size, even though many allocators require that all memory
/// reque
u
sts have positive size. A caller to the `Alloc::alloc`
/// requests have positive size. A caller to the `Alloc::alloc`
/// method must either ensure that conditions like this are met, or
/// use specific allocators with looser requirements.)
#[derive(Clone,
Debug,
PartialEq,
Eq)]
...
...
src/liballoc/btree/node.rs
浏览文件 @
47cb3c5b
...
...
@@ -132,7 +132,7 @@ unsafe fn new() -> Self {
/// An owned pointer to a node. This basically is either `Box<LeafNode<K, V>>` or
/// `Box<InternalNode<K, V>>`. However, it contains no information as to which of the two types
/// of nodes is ac
ut
ally behind the box, and, partially due to this lack of information, has no
/// of nodes is ac
tu
ally behind the box, and, partially due to this lack of information, has no
/// destructor.
struct
BoxedNode
<
K
,
V
>
{
ptr
:
Unique
<
LeafNode
<
K
,
V
>>
...
...
@@ -264,7 +264,7 @@ pub fn pop_level(&mut self) {
// correct variance.
/// A reference to a node.
///
/// This type has a number of param
a
ters that controls how it acts:
/// This type has a number of param
e
ters that controls how it acts:
/// - `BorrowType`: This can be `Immut<'a>` or `Mut<'a>` for some `'a` or `Owned`.
/// When this is `Immut<'a>`, the `NodeRef` acts roughly like `&'a Node`,
/// when this is `Mut<'a>`, the `NodeRef` acts roughly like `&'a mut Node`,
...
...
src/libcore/iter/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -1035,7 +1035,7 @@ unsafe impl<A, B> TrustedLen for Zip<A, B>
/// Now consider this twist where we add a call to `rev`. This version will
/// print `('c', 1), ('b', 2), ('a', 3)`. Note that the letters are reversed,
/// but the values of the counter still go in order. This is because `map()` is
/// still being called lazil
l
y on each item, but we are popping items off the
/// still being called lazily on each item, but we are popping items off the
/// back of the vector now, instead of shifting them from the front.
///
/// ```rust
...
...
src/libcore/iter/traits.rs
浏览文件 @
47cb3c5b
...
...
@@ -345,7 +345,7 @@ pub trait Extend<A> {
/// In a similar fashion to the [`Iterator`] protocol, once a
/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again
/// may or may not ever return `Some` again. `next()` and `next_back()` are
/// interchangable for this purpose.
/// interchang
e
able for this purpose.
///
/// [`Iterator`]: trait.Iterator.html
///
...
...
src/libcore/num/dec2flt/algorithm.rs
浏览文件 @
47cb3c5b
...
...
@@ -336,7 +336,7 @@ pub fn algorithm_m<T: RawFloat>(f: &Big, e: i16) -> T {
round_by_remainder
(
v
,
rem
,
q
,
z
)
}
/// Skip over most AlgorithmM iterations by checking the bit length.
/// Skip over most Algorithm
M iterations by checking the bit length.
fn
quick_start
<
T
:
RawFloat
>
(
u
:
&
mut
Big
,
v
:
&
mut
Big
,
k
:
&
mut
i16
)
{
// The bit length is an estimate of the base two logarithm, and log(u / v) = log(u) - log(v).
// The estimate is off by at most 1, but always an under-estimate, so the error on log(u)
...
...
src/libcore/tests/num/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -566,7 +566,7 @@ fn $fn_name() {
);
}
/// Conversi
no
s where neither the min nor the max of $source can be represented by
/// Conversi
on
s where neither the min nor the max of $source can be represented by
/// $target, but max/min of the target can be represented by the source.
macro_rules!
test_impl_try_from_signed_to_unsigned_err
{
(
$fn_name:ident
,
$source:ty
,
$target:ty
)
=>
{
...
...
src/librustc/traits/specialize/specialization_graph.rs
浏览文件 @
47cb3c5b
...
...
@@ -31,7 +31,7 @@
///
/// - Parent extraction. In particular, the graph can give you the *immediate*
/// parents of a given specializing impl, which is needed for extracting
/// default items amongst other thi
gn
s. In the simple "chain" rule, every impl
/// default items amongst other thi
ng
s. In the simple "chain" rule, every impl
/// has at most one parent.
pub
struct
Graph
{
// all impls have a parent; the "root" impls have as their parent the def_id
...
...
src/librustc/ty/adjustment.rs
浏览文件 @
47cb3c5b
...
...
@@ -29,7 +29,7 @@
/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is
/// `false`.
///
/// 2. A thin-to-fat coercon involves unsizing the underlying data. We start
/// 2. A thin-to-fat coerc
i
on involves unsizing the underlying data. We start
/// with a thin pointer, deref a number of times, unsize the underlying data,
/// then autoref. The 'unsize' phase may change a fixed length array to a
/// dynamically sized one, a concrete object to a trait object, or statically
...
...
@@ -52,7 +52,7 @@
/// that case, we have the pointer we need coming in, so there are no
/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation.
/// At some point, of course, `Box` should move out of the compiler, in which
/// case this is analogous to transform
at
ing a struct. E.g., Box<[i32; 4]> ->
/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> ->
/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`.
#[derive(Clone,
RustcEncodable,
RustcDecodable)]
pub
struct
Adjustment
<
'tcx
>
{
...
...
src/librustc_data_structures/stable_hasher.rs
浏览文件 @
47cb3c5b
...
...
@@ -193,7 +193,7 @@ fn write_isize(&mut self, i: isize) {
/// Something that implements `HashStable<CTX>` can be hashed in a way that is
/// stable across multiple compil
i
ation sessions.
/// stable across multiple compilation sessions.
pub
trait
HashStable
<
CTX
>
{
fn
hash_stable
<
W
:
StableHasherResult
>
(
&
self
,
hcx
:
&
mut
CTX
,
...
...
src/librustc_mir/dataflow/impls/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -212,7 +212,7 @@ fn move_data(&self) -> &MoveData<'tcx> { &self.mdpe.move_data }
/// you if an l-value *might* be uninitialized at a given point in the
/// control flow. But `MovingOutStatements` also includes the added
/// data of *which* particular statement causing the deinitialization
/// that the borrow checker's error me
e
ssage may need to report.
/// that the borrow checker's error message may need to report.
#[allow(dead_code)]
pub
struct
MovingOutStatements
<
'a
,
'tcx
:
'a
>
{
tcx
:
TyCtxt
<
'a
,
'tcx
,
'tcx
>
,
...
...
src/librustc_mir/hair/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -80,7 +80,7 @@ pub enum StmtKind<'tcx> {
/// The Hair trait implementor translates their expressions (`&'tcx H::Expr`)
/// into instances of this `Expr` enum. This translation can be done
/// basically as lazil
l
y or as eagerly as desired: every recursive
/// basically as lazily or as eagerly as desired: every recursive
/// reference to an expression in this enum is an `ExprRef<'tcx>`, which
/// may in turn be another instance of this enum (boxed), or else an
/// untranslated `&'tcx H::Expr`. Note that instances of `Expr` are very
...
...
src/librustc_trans/base.rs
浏览文件 @
47cb3c5b
...
...
@@ -191,7 +191,7 @@ pub fn compare_simd_types<'a, 'tcx>(
/// adjustment.
///
/// The `old_info` argument is a bit funny. It is intended for use
/// in an upcast, where the new vtable for an object will be drived
/// in an upcast, where the new vtable for an object will be d
e
rived
/// from the old one.
pub
fn
unsized_info
<
'ccx
,
'tcx
>
(
ccx
:
&
CrateContext
<
'ccx
,
'tcx
>
,
source
:
Ty
<
'tcx
>
,
...
...
src/librustc_typeck/check/dropck.rs
浏览文件 @
47cb3c5b
...
...
@@ -22,7 +22,7 @@
use
syntax_pos
::
Span
;
/// check_drop_impl confirms that the Drop implementation identfied by
/// check_drop_impl confirms that the Drop implementation ident
i
fied by
/// `drop_impl_did` is not any more specialized than the type it is
/// attached to (Issue #8142).
///
...
...
src/librustc_typeck/constrained_type_params.rs
浏览文件 @
47cb3c5b
...
...
@@ -98,7 +98,7 @@ pub fn identify_constrained_type_params<'tcx>(tcx: ty::TyCtxt,
/// Order the predicates in `predicates` such that each parameter is
/// constrained before it is used, if that is possible, and add the
/// param
a
ters so constrained to `input_parameters`. For example,
/// param
e
ters so constrained to `input_parameters`. For example,
/// imagine the following impl:
///
/// impl<T: Debug, U: Iterator<Item=T>> Trait for U
...
...
src/librustc_typeck/variance/constraints.rs
浏览文件 @
47cb3c5b
...
...
@@ -51,7 +51,7 @@ pub struct Constraint<'a> {
pub
variance
:
&
'a
VarianceTerm
<
'a
>
,
}
/// To build constr
ia
nts, we visit one item (type, trait) at a time
/// To build constr
ai
nts, we visit one item (type, trait) at a time
/// and look at its contents. So e.g. if we have
///
/// struct Foo<T> {
...
...
src/librustdoc/clean/inline.rs
浏览文件 @
47cb3c5b
...
...
@@ -495,7 +495,7 @@ fn build_static(cx: &DocContext, did: DefId, mutable: bool) -> clean::Static {
/// A trait's generics clause actually contains all of the predicates for all of
/// its associated types as well. We specifically move these clauses to the
/// associated types instead when displaying, so when we're genering the
/// associated types instead when displaying, so when we're gener
at
ing the
/// generics for the trait itself we need to be sure to remove them.
/// We also need to remove the implied "recursive" Self: Trait bound.
///
...
...
src/libstd/panic.rs
浏览文件 @
47cb3c5b
...
...
@@ -37,7 +37,7 @@
/// In Rust a function can "return" early if it either panics or calls a
/// function which transitively panics. This sort of control flow is not always
/// anticipated, and has the possibility of causing subtle bugs through a
/// combination of two cricial components:
/// combination of two cri
ti
cial components:
///
/// 1. A data structure is in a temporarily invalid state when the thread
/// panics.
...
...
src/libstd/sys/redox/syscall/call.rs
浏览文件 @
47cb3c5b
...
...
@@ -40,7 +40,7 @@ pub unsafe fn brk(addr: usize) -> Result<usize> {
///
/// * `EACCES` - permission is denied for one of the components of `path`, or `path`
/// * `EFAULT` - `path` does not point to the process's addressible memory
/// * `EIO` - an I/O error occured
/// * `EIO` - an I/O error occur
r
ed
/// * `ENOENT` - `path` does not exit
/// * `ENOTDIR` - `path` is not a directory
pub
fn
chdir
(
path
:
&
str
)
->
Result
<
usize
>
{
...
...
@@ -290,7 +290,7 @@ pub fn waitpid(pid: usize, status: &mut usize, options: usize) -> Result<usize>
/// * `EAGAIN` - the file descriptor was opened with `O_NONBLOCK` and writing would block
/// * `EBADF` - the file descriptor is not valid or is not open for writing
/// * `EFAULT` - `buf` does not point to the process's addressible memory
/// * `EIO` - an I/O error occured
/// * `EIO` - an I/O error occur
r
ed
/// * `ENOSPC` - the device containing the file descriptor has no room for data
/// * `EPIPE` - the file descriptor refers to a pipe or socket whose reading end is closed
pub
fn
write
(
fd
:
usize
,
buf
:
&
[
u8
])
->
Result
<
usize
>
{
...
...
src/libstd/thread/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -531,7 +531,7 @@ pub fn current() -> Thread {
///
/// However programmers will usually prefer to use, [`channel`]s, [`Condvar`]s,
/// [`Mutex`]es or [`join`] for their synchronisation routines, as they avoid
/// thinking about thread schedul
l
ing.
/// thinking about thread scheduling.
///
/// Note that [`channel`]s for example are implemented using this primitive.
/// Indeed when you call `send` or `recv`, which are blocking, they will yield
...
...
src/libsyntax/attr.rs
浏览文件 @
47cb3c5b
...
...
@@ -435,7 +435,7 @@ pub fn mk_attr_inner(span: Span, id: AttrId, item: MetaItem) -> Attribute {
mk_spanned_attr_inner
(
span
,
id
,
item
)
}
/// Returns an inn
t
er attribute with the given value and span.
/// Returns an inner attribute with the given value and span.
pub
fn
mk_spanned_attr_inner
(
sp
:
Span
,
id
:
AttrId
,
item
:
MetaItem
)
->
Attribute
{
Attribute
{
id
:
id
,
...
...
src/libsyntax/parse/mod.rs
浏览文件 @
47cb3c5b
...
...
@@ -124,7 +124,7 @@ pub fn parse_expr_from_source_str(name: String, source: String, sess: &ParseSess
/// Parses an item.
///
/// Returns `Ok(Some(item))` when successful, `Ok(None)` when no item was found, and`Err`
/// Returns `Ok(Some(item))` when successful, `Ok(None)` when no item was found, and
`Err`
/// when a syntax error occurred.
pub
fn
parse_item_from_source_str
(
name
:
String
,
source
:
String
,
sess
:
&
ParseSess
)
->
PResult
<
Option
<
P
<
ast
::
Item
>>>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录