Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
b9a026af
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
b9a026af
编写于
1月 30, 2014
作者:
V
Virgile Andreani
提交者:
Alex Crichton
1月 31, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix minor doc typos
上级
2c8b1125
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
55 addition
and
55 deletion
+55
-55
src/libextra/hex.rs
src/libextra/hex.rs
+2
-2
src/libextra/num/bigint.rs
src/libextra/num/bigint.rs
+2
-2
src/librustc/middle/kind.rs
src/librustc/middle/kind.rs
+2
-2
src/librustc/middle/lint.rs
src/librustc/middle/lint.rs
+1
-1
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/_match.rs
+2
-2
src/librustc/middle/ty.rs
src/librustc/middle/ty.rs
+2
-2
src/librustc/middle/typeck/astconv.rs
src/librustc/middle/typeck/astconv.rs
+2
-2
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/mod.rs
+2
-2
src/librustc/middle/typeck/collect.rs
src/librustc/middle/typeck/collect.rs
+2
-2
src/librustc/util/sha2.rs
src/librustc/util/sha2.rs
+2
-2
src/librustdoc/html/render.rs
src/librustdoc/html/render.rs
+2
-2
src/libstd/any.rs
src/libstd/any.rs
+2
-2
src/libstd/ascii.rs
src/libstd/ascii.rs
+5
-5
src/libstd/io/mod.rs
src/libstd/io/mod.rs
+1
-1
src/libstd/iter.rs
src/libstd/iter.rs
+1
-1
src/libstd/num/f32.rs
src/libstd/num/f32.rs
+4
-4
src/libstd/num/f64.rs
src/libstd/num/f64.rs
+4
-4
src/libstd/num/strconv.rs
src/libstd/num/strconv.rs
+2
-2
src/libstd/option.rs
src/libstd/option.rs
+1
-1
src/libstd/result.rs
src/libstd/result.rs
+2
-2
src/libstd/send_str.rs
src/libstd/send_str.rs
+2
-2
src/libstd/str.rs
src/libstd/str.rs
+2
-2
src/libstd/vec.rs
src/libstd/vec.rs
+1
-1
src/libsyntax/ast.rs
src/libsyntax/ast.rs
+2
-2
src/libsyntax/ext/deriving/generic.rs
src/libsyntax/ext/deriving/generic.rs
+2
-2
src/test/compile-fail/borrowck-anon-fields-struct.rs
src/test/compile-fail/borrowck-anon-fields-struct.rs
+1
-1
src/test/run-pass/expr-match-fail-all.rs
src/test/run-pass/expr-match-fail-all.rs
+2
-2
未找到文件。
src/libextra/hex.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -60,7 +60,7 @@ pub trait FromHex {
pub
enum
FromHexError
{
/// The input contained a character not part of the hex format
InvalidHexCharacter
(
char
,
uint
),
/// The input had a invalid length
/// The input had a
n
invalid length
InvalidHexLength
,
}
...
...
src/libextra/num/bigint.rs
浏览文件 @
b9a026af
...
...
@@ -1292,7 +1292,7 @@ fn to_str_radix(&self, radix: uint) -> ~str {
}
impl
FromStrRadix
for
BigInt
{
/// Creates and initializes a
n
BigInt.
/// Creates and initializes a BigInt.
#[inline]
fn
from_str_radix
(
s
:
&
str
,
radix
:
uint
)
->
Option
<
BigInt
>
{
BigInt
::
parse_bytes
(
s
.as_bytes
(),
radix
)
...
...
@@ -1385,7 +1385,7 @@ fn gen_bigint_range(&mut self,
}
impl
BigInt
{
/// Creates and initializes a
n
BigInt.
/// Creates and initializes a BigInt.
#[inline]
pub
fn
new
(
sign
:
Sign
,
v
:
~
[
BigDigit
])
->
BigInt
{
BigInt
::
from_biguint
(
sign
,
BigUint
::
new
(
v
))
...
...
src/librustc/middle/kind.rs
浏览文件 @
b9a026af
...
...
@@ -485,7 +485,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: Span) -> bool {
}
}
/// This is rather subtle. When we are casting a value to a instantiated
/// This is rather subtle. When we are casting a value to a
n
instantiated
/// trait like `a as trait<'r>`, regionck already ensures that any references
/// that appear in the type of `a` are bounded by `'r` (ed.: rem
/// FIXME(#5723)). However, it is possible that there are *type parameters*
...
...
@@ -516,7 +516,7 @@ pub fn check_cast_for_escaping_regions(
target_ty
:
ty
::
t
,
source_span
:
Span
)
{
// Determine what type we are casting to; if it is not a
n
trait, then no
// Determine what type we are casting to; if it is not a trait, then no
// worries.
match
ty
::
get
(
target_ty
)
.sty
{
ty
::
ty_trait
(
..
)
=>
{}
...
...
src/librustc/middle/lint.rs
浏览文件 @
b9a026af
...
...
@@ -371,7 +371,7 @@ enum LintSource {
(
"unused_must_use"
,
LintSpec
{
lint
:
UnusedMustUse
,
desc
:
"unused result of a
n
type flagged as #[must_use]"
,
desc
:
"unused result of a type flagged as #[must_use]"
,
default
:
warn
,
}),
...
...
src/librustc/middle/trans/_match.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -244,7 +244,7 @@ pub enum VecLenOpt {
vec_len_ge
(
/* length of prefix */
uint
)
}
// An option identifying a branch (either a literal, a enum variant or a
// An option identifying a branch (either a literal, a
n
enum variant or a
// range)
enum
Opt
{
lit
(
Lit
),
...
...
src/librustc/middle/ty.rs
浏览文件 @
b9a026af
// Copyright 2012-201
3
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
4
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -2591,7 +2591,7 @@ pub fn type_is_sized(cx: ctxt, ty: ty::t) -> bool {
}
}
// Whether a type is enum like, that is a enum type with only nullary
// Whether a type is enum like, that is a
n
enum type with only nullary
// constructors
pub
fn
type_is_c_like_enum
(
cx
:
ctxt
,
ty
:
t
)
->
bool
{
match
get
(
ty
)
.sty
{
...
...
src/librustc/middle/typeck/astconv.rs
浏览文件 @
b9a026af
// Copyright 2012-201
3
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
4
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -385,7 +385,7 @@ fn ast_mt_to_mt<AC:AstConv, RS:RegionScope>(
}
// Handle @, ~, and & being able to mean strs and vecs.
// If a_seq_ty is a str or a vec, make it a
n
str/vec.
// If a_seq_ty is a str or a vec, make it a str/vec.
// Also handle first-class trait types.
fn
mk_pointer
<
AC
:
AstConv
,
RS
:
RegionScope
>
(
...
...
src/librustc/middle/typeck/check/mod.rs
浏览文件 @
b9a026af
// Copyright 2012-201
3
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
4
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -2008,7 +2008,7 @@ fn lookup_op_method(fcx: @FnCtxt,
}
}
// could be either a expr_binop or an expr_assign_binop
// could be either a
n
expr_binop or an expr_assign_binop
fn
check_binop
(
fcx
:
@
FnCtxt
,
callee_id
:
ast
::
NodeId
,
expr
:
&
ast
::
Expr
,
...
...
src/librustc/middle/typeck/collect.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -737,7 +737,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt,
/*!
* Instantiates the path for the given trait reference, assuming that
* it's bound to a valid trait type. Returns the def_id for the defining
* trait. Fails if the type is a type other than a
n
trait type.
* trait. Fails if the type is a type other than a trait type.
*/
// FIXME(#5121) -- distinguish early vs late lifetime params
...
...
src/librustc/util/sha2.rs
浏览文件 @
b9a026af
// Copyright 2012-201
3
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
4
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -476,7 +476,7 @@ pub struct Sha256 {
}
impl
Sha256
{
/// Construct a
n
new instance of a SHA-256 digest.
/// Construct a new instance of a SHA-256 digest.
pub
fn
new
()
->
Sha256
{
Sha256
{
engine
:
Engine256
::
new
(
&
H256
)
...
...
src/librustdoc/html/render.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -101,7 +101,7 @@ pub enum ExternalLocation {
enum
Implementor
{
/// Paths are displayed specially by omitting the `impl XX for` cruft
PathType
(
clean
::
Type
),
/// This is the generic representation of a
n
trait implementor, used for
/// This is the generic representation of a trait implementor, used for
/// primitive types and otherwise non-path types.
OtherType
(
clean
::
Generics
,
/* trait */
clean
::
Type
,
/* for */
clean
::
Type
),
}
...
...
src/libstd/any.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -118,7 +118,7 @@ fn as_mut<T: 'static>(self) -> Option<&'a mut T> {
}
}
/// Extension methods for a owning `Any` trait object
/// Extension methods for a
n
owning `Any` trait object
pub
trait
AnyOwnExt
{
/// Returns the boxed value if it is of type `T`, or
/// `Err(Self)` if it isn't.
...
...
src/libstd/ascii.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -27,13 +27,13 @@
pub
struct
Ascii
{
priv
chr
:
u8
}
impl
Ascii
{
/// Converts a ascii character into a `u8`.
/// Converts a
n
ascii character into a `u8`.
#[inline]
pub
fn
to_byte
(
self
)
->
u8
{
self
.chr
}
/// Converts a ascii character into a `char`.
/// Converts a
n
ascii character into a `char`.
#[inline]
pub
fn
to_char
(
self
)
->
char
{
self
.chr
as
char
...
...
@@ -314,9 +314,9 @@ fn iter_bytes(&self, _lsb0: bool, f: |buf: &[u8]| -> bool) -> bool {
}
}
/// Trait to convert to a owned byte array by consuming self
/// Trait to convert to a
n
owned byte array by consuming self
pub
trait
IntoBytes
{
/// Converts to a owned byte array by consuming self
/// Converts to a
n
owned byte array by consuming self
fn
into_bytes
(
self
)
->
~
[
u8
];
}
...
...
src/libstd/io/mod.rs
浏览文件 @
b9a026af
...
...
@@ -83,7 +83,7 @@
let lines: ~[~str] = file.lines().collect();
```
* Make a
n
simple HTTP request
* Make a simple HTTP request
FIXME This needs more improvement: TcpStream constructor taking &str,
`write_str` and `write_line` methods.
...
...
src/libstd/iter.rs
浏览文件 @
b9a026af
...
...
@@ -213,7 +213,7 @@ fn enumerate(self) -> Enumerate<Self> {
/// Creates an iterator that has a `.peek()` method
/// that returns a optional reference to the next element.
/// that returns a
n
optional reference to the next element.
///
/// # Example
///
...
...
src/libstd/num/f32.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -812,7 +812,7 @@ fn to_str_radix(&self, rdx: uint) -> ~str {
}
/// Convert a string in base 16 to a float.
/// Accepts a optional binary exponent.
/// Accepts a
n
optional binary exponent.
///
/// This function accepts strings such as
///
...
...
@@ -844,7 +844,7 @@ pub fn from_str_hex(num: &str) -> Option<f32> {
impl
FromStr
for
f32
{
/// Convert a string in base 10 to a float.
/// Accepts a optional decimal exponent.
/// Accepts a
n
optional decimal exponent.
///
/// This function accepts strings such as
///
...
...
@@ -876,7 +876,7 @@ fn from_str(val: &str) -> Option<f32> {
}
impl
num
::
FromStrRadix
for
f32
{
/// Convert a string in a
n
given base to a float.
/// Convert a string in a given base to a float.
///
/// Due to possible conflicts, this function does **not** accept
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
...
...
src/libstd/num/f64.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -814,7 +814,7 @@ fn to_str_radix(&self, rdx: uint) -> ~str {
}
/// Convert a string in base 16 to a float.
/// Accepts a optional binary exponent.
/// Accepts a
n
optional binary exponent.
///
/// This function accepts strings such as
///
...
...
@@ -846,7 +846,7 @@ pub fn from_str_hex(num: &str) -> Option<f64> {
impl
FromStr
for
f64
{
/// Convert a string in base 10 to a float.
/// Accepts a optional decimal exponent.
/// Accepts a
n
optional decimal exponent.
///
/// This function accepts strings such as
///
...
...
@@ -878,7 +878,7 @@ fn from_str(val: &str) -> Option<f64> {
}
impl
num
::
FromStrRadix
for
f64
{
/// Convert a string in a
n
given base to a float.
/// Convert a string in a given base to a float.
///
/// Due to possible conflicts, this function does **not** accept
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
...
...
src/libstd/num/strconv.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -517,7 +517,7 @@ pub fn float_to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Float+Round+
* - `ExpBin`: Accepts numbers with a binary exponent like `42P-8` or
* `FFp128`. The exponent string itself is always base 10.
* Can conflict with `radix`, see Failure.
* - `empty_zero` - Whether to accept a empty `buf` as a 0 or not.
* - `empty_zero` - Whether to accept a
n
empty `buf` as a 0 or not.
* - `ignore_underscores` - Whether all underscores within the string should
* be ignored.
*
...
...
src/libstd/option.rs
浏览文件 @
b9a026af
...
...
@@ -121,7 +121,7 @@ pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] {
// Getting to contained values
/////////////////////////////////////////////////////////////////////////
/// Unwraps a option, yielding the content of a `Some`
/// Unwraps a
n
option, yielding the content of a `Some`
/// Fails if the value is a `None` with a custom failure message provided by `msg`.
#[inline]
pub
fn
expect
<
M
:
Any
+
Send
>
(
self
,
msg
:
M
)
->
T
{
...
...
src/libstd/result.rs
浏览文件 @
b9a026af
...
...
@@ -102,7 +102,7 @@ pub fn as_mut<'r>(&'r mut self) -> Result<&'r mut T, &'r mut E> {
// Transforming contained values
/////////////////////////////////////////////////////////////////////////
/// Maps a
n
`Result<T, E>` to `Result<U, E>` by applying a function to an
/// Maps a `Result<T, E>` to `Result<U, E>` by applying a function to an
/// contained `Ok` value, leaving an `Err` value untouched.
///
/// This function can be used to compose the results of two functions.
...
...
@@ -120,7 +120,7 @@ pub fn map<U>(self, op: |T| -> U) -> Result<U,E> {
}
}
/// Maps a
n
`Result<T, E>` to `Result<T, F>` by applying a function to an
/// Maps a `Result<T, E>` to `Result<T, F>` by applying a function to an
/// contained `Err` value, leaving an `Ok` value untouched.
///
/// This function can be used to pass through a successful result while handling
...
...
src/libstd/send_str.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -38,7 +38,7 @@ pub fn is_owned(&self) -> bool {
}
}
/// Returns `true` if this `SendStr` wraps a
n
static string
/// Returns `true` if this `SendStr` wraps a static string
#[inline]
pub
fn
is_static
(
&
self
)
->
bool
{
match
*
self
{
...
...
src/libstd/str.rs
浏览文件 @
b9a026af
// Copyright 2012-201
3
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
4
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -417,7 +417,7 @@ pub struct CharSplitsN<'a, Sep> {
priv
invert
:
bool
,
}
/// An iterator over the words of a string, separated by a
n
sequence of whitespace
/// An iterator over the words of a string, separated by a sequence of whitespace
pub
type
Words
<
'a
>
=
Filter
<
'a
,
&
'a
str
,
CharSplits
<
'a
,
extern
"Rust"
fn
(
char
)
->
bool
>>
;
...
...
src/libstd/vec.rs
浏览文件 @
b9a026af
...
...
@@ -804,7 +804,7 @@ pub trait CloneableVector<T> {
/// Copy `self` into a new owned vector
fn
to_owned
(
&
self
)
->
~
[
T
];
/// Convert `self` into a owned vector, not making a copy if possible.
/// Convert `self` into a
n
owned vector, not making a copy if possible.
fn
into_owned
(
self
)
->
~
[
T
];
}
...
...
src/libsyntax/ast.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -680,7 +680,7 @@ pub enum TokenTree {
//
// As a final, horrifying aside, note that macro-by-example's input is
// also matched by one of these matchers. Holy self-referential! It is matched
// by a
n
MatchSeq, specifically this one:
// by a MatchSeq, specifically this one:
//
// $( $lhs:matchers => $rhs:tt );+
//
...
...
src/libsyntax/ext/deriving/generic.rs
浏览文件 @
b9a026af
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -42,7 +42,7 @@
the same variant (e.g. `None`, `Some(1)` and `None`). If
`const_nonmatching` is true, this will contain an empty list.
- `StaticEnum` and `StaticStruct` for static methods, where the type
being derived upon is either a enum or struct respectively. (Any
being derived upon is either a
n
enum or struct respectively. (Any
argument with type Self is just grouped among the non-self
arguments.)
...
...
src/test/compile-fail/borrowck-anon-fields-struct.rs
浏览文件 @
b9a026af
// Tests that we are able to distinguish when loans borrow different
// anonymous fields of a
n
tuple vs the same anonymous field.
// anonymous fields of a tuple vs the same anonymous field.
struct
Y
(
uint
,
uint
);
...
...
src/test/run-pass/expr-match-fail-all.rs
浏览文件 @
b9a026af
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
@@ -11,7 +11,7 @@
// When all branches of a
n
match expression result in fail, the entire
// When all branches of a match expression result in fail, the entire
// match expression results in fail.
pub
fn
main
()
{
let
_
x
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录