Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
a9f9e80d
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
a9f9e80d
编写于
11月 16, 2014
作者:
J
Jakub Bukaj
浏览文件
操作
浏览文件
下载
差异文件
rollup merge of #18989: alex/fix-typos
上级
086b2974
e94cd40f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
7 deletion
+7
-7
src/doc/guide-strings.md
src/doc/guide-strings.md
+1
-1
src/doc/reference.md
src/doc/reference.md
+6
-6
未找到文件。
src/doc/guide-strings.md
浏览文件 @
a9f9e80d
...
...
@@ -155,7 +155,7 @@ println!("{}", s[0]);
This does not compile. This is on purpose. In the world of UTF-8, direct
indexing is basically never what you want to do. The reason is that each
character can be a variable number of bytes. This means that you have to iterate
through the characters anyway, which is a
O(n) operation.
through the characters anyway, which is a
n O(n) operation.
There's 3 basic levels of unicode (and its encodings):
...
...
src/doc/reference.md
浏览文件 @
a9f9e80d
...
...
@@ -2526,7 +2526,7 @@ The currently implemented features of the reference compiler are:
*
`plugin_registrar`
- Indicates that a crate has
[
compiler plugins
][
plugin
]
that it
wants to load. As with
`phase`
, the implementation is
in need of a overhaul, and it is not clear that plugins
in need of a
n
overhaul, and it is not clear that plugins
defined using this will continue to work.
*
`quote`
- Allows use of the
`quote_*!`
family of macros, which are
...
...
@@ -2583,7 +2583,7 @@ there isn't a parser error first). The directive in this case is no longer
necessary, and it's likely that existing code will break if the feature isn't
removed.
If a unknown feature is found in a directive, it results in a compiler error.
If a
n
unknown feature is found in a directive, it results in a compiler error.
An unknown feature is one which has never been recognized by the compiler.
# Statements and expressions
...
...
@@ -2685,7 +2685,7 @@ When an lvalue is evaluated in an _lvalue context_, it denotes a memory
location; when evaluated in an _rvalue context_, it denotes the value held _in_
that memory location.
When an rvalue is used in lvalue context, a temporary un-named lvalue is
When an rvalue is used in
an
lvalue context, a temporary un-named lvalue is
created and used instead. A temporary's lifetime equals the largest lifetime
of any reference that points to it.
...
...
@@ -2833,7 +2833,7 @@ foo().x;
```
A field access is an
[
lvalue
](
#lvalues,-rvalues-and-temporaries
)
referring to
the value of that field. When the type providing the field inherits mutabilty,
the value of that field. When the type providing the field inherits mutabil
i
ty,
it can be
[
assigned
](
#assignment-expressions
)
to.
Also, if the type of the expression to the left of the dot is a pointer, it is
...
...
@@ -3320,7 +3320,7 @@ between `_` and `..` is that the pattern `C(_)` is only type-correct if `C` has
exactly one argument, while the pattern
`C(..)`
is type-correct for any enum
variant
`C`
, regardless of how many arguments
`C`
has.
Used inside a array pattern,
`..`
stands for any number of elements, when the
Used inside a
n
array pattern,
`..`
stands for any number of elements, when the
`advanced_slice_patterns`
feature gate is turned on. This wildcard can be used
at most once for a given array, which implies that it cannot be used to
specifically match elements that are at an unknown distance from both ends of a
...
...
@@ -3583,7 +3583,7 @@ is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
0xD7FF or 0xE000 to 0x10FFFF range. A
`[char]`
array is effectively an UCS-4 /
UTF-32 string.
A value of type
`str`
is a Unicode string, represented as a array of 8-bit
A value of type
`str`
is a Unicode string, represented as a
n
array of 8-bit
unsigned bytes holding a sequence of UTF-8 codepoints. Since
`str`
is of
unknown size, it is not a _first class_ type, but can only be instantiated
through a pointer type, such as
`&str`
or
`String`
.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录