Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
4f14bfdc
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,发现更多精彩内容 >>
未验证
提交
4f14bfdc
编写于
10月 25, 2018
作者:
P
Pietro Albini
提交者:
GitHub
10月 25, 2018
浏览文件
操作
浏览文件
下载
差异文件
Rollup merge of #55269 - matthiaskrgr:typos_oct, r=zackmdavis
fix typos in various places
上级
88341a99
4972beaf
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
77 addition
and
77 deletion
+77
-77
src/bootstrap/bootstrap.py
src/bootstrap/bootstrap.py
+1
-1
src/etc/lldb_rust_formatters.py
src/etc/lldb_rust_formatters.py
+1
-1
src/liballoc/collections/btree/map.rs
src/liballoc/collections/btree/map.rs
+1
-1
src/libcore/alloc.rs
src/libcore/alloc.rs
+1
-1
src/libcore/intrinsics.rs
src/libcore/intrinsics.rs
+1
-1
src/libcore/pin.rs
src/libcore/pin.rs
+1
-1
src/libcore/ptr.rs
src/libcore/ptr.rs
+1
-1
src/librustc/hir/def_id.rs
src/librustc/hir/def_id.rs
+2
-2
src/librustc/mir/interpret/mod.rs
src/librustc/mir/interpret/mod.rs
+1
-1
src/librustc/mir/mod.rs
src/librustc/mir/mod.rs
+1
-1
src/librustc/traits/error_reporting.rs
src/librustc/traits/error_reporting.rs
+1
-1
src/librustc_codegen_llvm/builder.rs
src/librustc_codegen_llvm/builder.rs
+1
-1
src/librustc_metadata/cstore_impl.rs
src/librustc_metadata/cstore_impl.rs
+1
-1
src/librustc_mir/const_eval.rs
src/librustc_mir/const_eval.rs
+1
-1
src/librustc_mir/diagnostics.rs
src/librustc_mir/diagnostics.rs
+1
-1
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/eval_context.rs
+1
-1
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/memory.rs
+3
-3
src/librustc_mir/interpret/operand.rs
src/librustc_mir/interpret/operand.rs
+2
-2
src/librustc_mir/interpret/validity.rs
src/librustc_mir/interpret/validity.rs
+2
-2
src/librustc_passes/ast_validation.rs
src/librustc_passes/ast_validation.rs
+8
-8
src/librustc_target/abi/mod.rs
src/librustc_target/abi/mod.rs
+1
-1
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/mod.rs
+1
-1
src/librustc_typeck/check/wfcheck.rs
src/librustc_typeck/check/wfcheck.rs
+1
-1
src/librustc_typeck/coherence/builtin.rs
src/librustc_typeck/coherence/builtin.rs
+1
-1
src/libstd/sync/mod.rs
src/libstd/sync/mod.rs
+1
-1
src/libstd/sync/once.rs
src/libstd/sync/once.rs
+2
-2
src/libsyntax/config.rs
src/libsyntax/config.rs
+2
-2
src/test/run-pass/issues/issue-18804/main.rs
src/test/run-pass/issues/issue-18804/main.rs
+1
-1
src/test/ui/block-result/unexpected-return-on-unit.rs
src/test/ui/block-result/unexpected-return-on-unit.rs
+1
-1
src/test/ui/conditional-compilation/cfg-attr-multi-false.rs
src/test/ui/conditional-compilation/cfg-attr-multi-false.rs
+1
-1
src/test/ui/nll/issue-21232-partial-init-and-use.rs
src/test/ui/nll/issue-21232-partial-init-and-use.rs
+1
-1
src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
...i/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
+1
-1
src/test/ui/resolve/token-error-correct-2.rs
src/test/ui/resolve/token-error-correct-2.rs
+1
-1
src/test/ui/resolve/token-error-correct-3.rs
src/test/ui/resolve/token-error-correct-3.rs
+1
-1
src/test/ui/resolve/token-error-correct.rs
src/test/ui/resolve/token-error-correct.rs
+1
-1
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.rs
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.rs
+6
-6
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
...st/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
+6
-6
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.rs
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.rs
+6
-6
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
...st/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
+6
-6
src/test/ui/rust-2018/edition-lint-infer-outlives.fixed
src/test/ui/rust-2018/edition-lint-infer-outlives.fixed
+1
-1
src/test/ui/rust-2018/edition-lint-infer-outlives.rs
src/test/ui/rust-2018/edition-lint-infer-outlives.rs
+1
-1
src/test/ui/specialization/issue-52050.rs
src/test/ui/specialization/issue-52050.rs
+1
-1
src/tools/tidy/src/pal.rs
src/tools/tidy/src/pal.rs
+1
-1
未找到文件。
src/bootstrap/bootstrap.py
浏览文件 @
4f14bfdc
...
...
@@ -594,7 +594,7 @@ class RustBuild(object):
return
''
def
bootstrap_binary
(
self
):
"""Return the path of the boostrap binary
"""Return the path of the boo
t
strap binary
>>> rb = RustBuild()
>>> rb.build_dir = "build"
...
...
src/etc/lldb_rust_formatters.py
浏览文件 @
4f14bfdc
...
...
@@ -277,7 +277,7 @@ def print_std_string_val(val, internal_dict):
#=--------------------------------------------------------------------------------------------------
def
print_array_of_values
(
array_name
,
data_ptr_val
,
length
,
internal_dict
):
"""Prints a contigous memory range, interpreting it as values of the
"""Prints a contig
u
ous memory range, interpreting it as values of the
pointee-type of data_ptr_val."""
data_ptr_type
=
data_ptr_val
.
type
...
...
src/liballoc/collections/btree/map.rs
浏览文件 @
4f14bfdc
...
...
@@ -77,7 +77,7 @@
/// movie_reviews.insert("Office Space", "Deals with real issues in the workplace.");
/// movie_reviews.insert("Pulp Fiction", "Masterpiece.");
/// movie_reviews.insert("The Godfather", "Very enjoyable.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it alot.");
/// movie_reviews.insert("The Blues Brothers", "Eye lyked it a
lot.");
///
/// // check for a specific one.
/// if !movie_reviews.contains_key("Les Misérables") {
...
...
src/libcore/alloc.rs
浏览文件 @
4f14bfdc
...
...
@@ -518,7 +518,7 @@ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
/// The block is described by the given `ptr` pointer and `layout`.
///
/// If this returns a non-null pointer, then ownership of the memory block
/// referenced by `ptr` has been transferred to this alloctor.
/// referenced by `ptr` has been transferred to this alloc
a
tor.
/// The memory may or may not have been deallocated,
/// and should be considered unusable (unless of course it was
/// transferred back to the caller again via the return value of
...
...
src/libcore/intrinsics.rs
浏览文件 @
4f14bfdc
...
...
@@ -1025,7 +1025,7 @@
/// // to avoid problems in case something further down panics.
/// src.set_len(0);
///
/// // The two regions cannot overlap bec
ua
se mutable references do
/// // The two regions cannot overlap bec
au
se mutable references do
/// // not alias, and two different vectors cannot own the same
/// // memory.
/// ptr::copy_nonoverlapping(src_ptr, dst_ptr, src_len);
...
...
src/libcore/pin.rs
浏览文件 @
4f14bfdc
...
...
@@ -102,7 +102,7 @@
/// value in place, preventing the value referenced by that pointer from being moved
/// unless it implements [`Unpin`].
///
/// See the [`pin` module] documentation for furth
u
r explanation on pinning.
/// See the [`pin` module] documentation for furth
e
r explanation on pinning.
///
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
/// [`pin` module]: ../../std/pin/index.html
...
...
src/libcore/ptr.rs
浏览文件 @
4f14bfdc
...
...
@@ -38,7 +38,7 @@
//! underlying object is live and no reference (just raw pointers) is used to
//! access the same memory.
//!
//! These axioms, along with careful use of [`offset`] for pointer arithme
n
tic,
//! These axioms, along with careful use of [`offset`] for pointer arithmetic,
//! are enough to correctly implement many useful things in unsafe code. Stronger guarantees
//! will be provided eventually, as the [aliasing] rules are being determined. For more
//! information, see the [book] as well as the section in the reference devoted
...
...
src/librustc/hir/def_id.rs
浏览文件 @
4f14bfdc
...
...
@@ -40,7 +40,7 @@ fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
match
self
{
CrateNum
::
Index
(
id
)
=>
write!
(
fmt
,
"crate{}"
,
id
.private
),
CrateNum
::
Invalid
=>
write!
(
fmt
,
"invalid crate"
),
CrateNum
::
BuiltinMacros
=>
write!
(
fmt
,
"bultin macros crate"
),
CrateNum
::
BuiltinMacros
=>
write!
(
fmt
,
"bu
i
ltin macros crate"
),
CrateNum
::
ReservedForIncrCompCache
=>
write!
(
fmt
,
"crate for decoding incr comp cache"
),
}
}
...
...
@@ -101,7 +101,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match
self
{
CrateNum
::
Index
(
id
)
=>
fmt
::
Display
::
fmt
(
&
id
.private
,
f
),
CrateNum
::
Invalid
=>
write!
(
f
,
"invalid crate"
),
CrateNum
::
BuiltinMacros
=>
write!
(
f
,
"bultin macros crate"
),
CrateNum
::
BuiltinMacros
=>
write!
(
f
,
"bu
i
ltin macros crate"
),
CrateNum
::
ReservedForIncrCompCache
=>
write!
(
f
,
"crate for decoding incr comp cache"
),
}
}
...
...
src/librustc/mir/interpret/mod.rs
浏览文件 @
4f14bfdc
...
...
@@ -632,7 +632,7 @@ pub fn read_target_uint(endianness: layout::Endian, mut source: &[u8]) -> Result
}
////////////////////////////////////////////////////////////////////////////////
// Methods to faciliate working with signed integers stored in a u128
// Methods to facili
t
ate working with signed integers stored in a u128
////////////////////////////////////////////////////////////////////////////////
pub
fn
sign_extend
(
value
:
u128
,
size
:
Size
)
->
u128
{
...
...
src/librustc/mir/mod.rs
浏览文件 @
4f14bfdc
...
...
@@ -469,7 +469,7 @@ pub enum BorrowKind {
/// }
///
/// This can't be a shared borrow because mutably borrowing (*x as Some).0
/// should not prevent `if let None = x { ... }`, for example, becase the
/// should not prevent `if let None = x { ... }`, for example, beca
u
se the
/// mutating `(*x as Some).0` can't affect the discriminant of `x`.
/// We can also report errors with this kind of borrow differently.
Shallow
,
...
...
src/librustc/traits/error_reporting.rs
浏览文件 @
4f14bfdc
...
...
@@ -412,7 +412,7 @@ fn on_unimplemented_note(
flags
.push
((
"crate_local"
.to_owned
(),
None
));
}
// Allow target
t
ing all integers using `{integral}`, even if the exact type was resolved
// Allow targeting all integers using `{integral}`, even if the exact type was resolved
if
self_ty
.is_integral
()
{
flags
.push
((
"_Self"
.to_owned
(),
Some
(
"{integral}"
.to_owned
())));
}
...
...
src/librustc_codegen_llvm/builder.rs
浏览文件 @
4f14bfdc
...
...
@@ -761,7 +761,7 @@ pub fn inline_asm_call(&self, asm: *const c_char, cons: *const c_char,
fty
,
asm
,
cons
,
volatile
,
alignstack
,
dia
);
Some
(
self
.call
(
v
,
inputs
,
None
))
}
else
{
// LLVM has detected an issue with our constaints, bail out
// LLVM has detected an issue with our const
r
aints, bail out
None
}
}
...
...
src/librustc_metadata/cstore_impl.rs
浏览文件 @
4f14bfdc
...
...
@@ -68,7 +68,7 @@ pub fn provide_extern<$lt>(providers: &mut Providers<$lt>) {
let
$cdata
=
$tcx
.crate_data_as_rc_any
(
$def_id
.krate
);
let
$cdata
=
$cdata
.downcast_ref
::
<
cstore
::
CrateMetadata
>
()
.expect
(
"CrateStore cr
ated
ata is not a CrateMetadata"
);
.expect
(
"CrateStore cr
eated d
ata is not a CrateMetadata"
);
$compute
})
*
...
...
src/librustc_mir/const_eval.rs
浏览文件 @
4f14bfdc
...
...
@@ -129,7 +129,7 @@ pub fn op_to_const<'tcx>(
assert
!
(
alloc
.bytes
.len
()
as
u64
-
ptr
.offset
.bytes
()
>=
op
.layout.size
.bytes
());
let
mut
alloc
=
alloc
.clone
();
alloc
.align
=
align
;
// FIXME shouldnt it be the case that `mark_static_initialized` has already
// FIXME shouldn
'
t it be the case that `mark_static_initialized` has already
// interned this? I thought that is the entire point of that `FinishStatic` stuff?
let
alloc
=
ecx
.tcx
.intern_const_alloc
(
alloc
);
ConstValue
::
ByRef
(
ptr
.alloc_id
,
alloc
,
ptr
.offset
)
...
...
src/librustc_mir/diagnostics.rs
浏览文件 @
4f14bfdc
...
...
@@ -2279,7 +2279,7 @@ impl<'a> Drop for S<'a> {
Note that this approach needs a reference to S with lifetime `'a`.
Nothing shorter than `'a` will suffice: a shorter lifetime would imply
that after `demo` finishes excuting, something else (such as the
that after `demo` finishes ex
e
cuting, something else (such as the
destructor!) could access `s.data` after the end of that shorter
lifetime, which would again violate the `&mut`-borrow's exclusive
access.
...
...
src/librustc_mir/interpret/eval_context.rs
浏览文件 @
4f14bfdc
...
...
@@ -556,7 +556,7 @@ pub(super) fn pop_stack_frame(&mut self) -> EvalResult<'tcx> {
)
?
;
}
}
else
{
// Uh, that shouln't happen... the function did not intend to return
// Uh, that shoul
d
n't happen... the function did not intend to return
return
err!
(
Unreachable
);
}
...
...
src/librustc_mir/interpret/memory.rs
浏览文件 @
4f14bfdc
...
...
@@ -94,7 +94,7 @@ fn data_layout(&self) -> &TargetDataLayout {
}
}
// FIXME: Really we shouldn
t clone memory, ever. Snapshot machinery should inst
ad
// FIXME: Really we shouldn
't clone memory, ever. Snapshot machinery should inste
ad
// carefully copy only the reachable parts.
impl
<
'a
,
'mir
,
'tcx
:
'a
+
'mir
,
M
:
Machine
<
'a
,
'mir
,
'tcx
>>
Clone
for
Memory
<
'a
,
'mir
,
'tcx
,
M
>
...
...
@@ -658,7 +658,7 @@ fn get_bytes(
}
/// It is the caller's responsibility to handle undefined and pointer bytes.
/// However, this still checks that there are no relocations on the *e
gd
es*.
/// However, this still checks that there are no relocations on the *e
dg
es*.
#[inline]
fn
get_bytes_with_undef_and_ptr
(
&
self
,
...
...
@@ -1098,7 +1098,7 @@ fn clear_relocations(&mut self, ptr: Pointer<M::PointerTag>, size: Size) -> Eval
Ok
(())
}
/// Error if there are relocations overlapping with the e
gd
es of the
/// Error if there are relocations overlapping with the e
dg
es of the
/// given memory range.
#[inline]
fn
check_relocation_edges
(
&
self
,
ptr
:
Pointer
<
M
::
PointerTag
>
,
size
:
Size
)
->
EvalResult
<
'tcx
>
{
...
...
src/librustc_mir/interpret/operand.rs
浏览文件 @
4f14bfdc
...
...
@@ -357,14 +357,14 @@ fn from_known_layout<'tcx>(
}
impl
<
'a
,
'mir
,
'tcx
,
M
:
Machine
<
'a
,
'mir
,
'tcx
>>
EvalContext
<
'a
,
'mir
,
'tcx
,
M
>
{
/// Try reading a value in memory; this is interesting particular
i
ly for ScalarPair.
/// Try reading a value in memory; this is interesting particularly for ScalarPair.
/// Return None if the layout does not permit loading this as a value.
pub
(
super
)
fn
try_read_value_from_mplace
(
&
self
,
mplace
:
MPlaceTy
<
'tcx
,
M
::
PointerTag
>
,
)
->
EvalResult
<
'tcx
,
Option
<
Value
<
M
::
PointerTag
>>>
{
if
mplace
.layout
.is_unsized
()
{
// Dont touch unsized
// Don
'
t touch unsized
return
Ok
(
None
);
}
let
(
ptr
,
ptr_align
)
=
mplace
.to_scalar_ptr_align
();
...
...
src/librustc_mir/interpret/validity.rs
浏览文件 @
4f14bfdc
...
...
@@ -230,7 +230,7 @@ fn validate_primitive_type(
),
}
}
// non-ZST also have to be dereferencable
// non-ZST also have to be dereferenc
e
able
if
size
!=
Size
::
ZERO
{
let
ptr
=
try_validation!
(
place
.ptr
.to_ptr
(),
"integer pointer in non-ZST reference"
,
path
);
...
...
@@ -272,7 +272,7 @@ fn validate_primitive_type(
// FIXME: Check if the signature matches
}
// This should be all the primitive types
ty
::
Never
=>
bug!
(
"Uninhabited type should have been ca
tched
earlier"
),
ty
::
Never
=>
bug!
(
"Uninhabited type should have been ca
ught
earlier"
),
_
=>
bug!
(
"Unexpected primitive type {}"
,
value
.layout.ty
)
}
Ok
(())
...
...
src/librustc_passes/ast_validation.rs
浏览文件 @
4f14bfdc
...
...
@@ -166,12 +166,12 @@ fn check_late_bound_lifetime_defs(&self, params: &[GenericParam]) {
}
}
/// With eRFC 2497, we need to check whether an expression is ambig
i
ous and warn or error
/// With eRFC 2497, we need to check whether an expression is ambig
u
ous and warn or error
/// depending on the edition, this function handles that.
fn
while_if_let_ambiguity
(
&
self
,
expr
:
&
P
<
Expr
>
)
{
if
let
Some
((
span
,
op_kind
))
=
self
.while_if_let_expr_ambiguity
(
&
expr
)
{
let
mut
err
=
self
.err_handler
()
.struct_span_err
(
span
,
&
format!
(
"ambig
i
ous use of `{}`"
,
op_kind
.to_string
())
span
,
&
format!
(
"ambig
u
ous use of `{}`"
,
op_kind
.to_string
())
);
err
.note
(
...
...
@@ -193,9 +193,9 @@ fn while_if_let_ambiguity(&self, expr: &P<Expr>) {
}
/// With eRFC 2497 adding if-let chains, there is a requirement that the parsing of
/// `&&` and `||` in a if-let statement be unambig
i
ous. This function returns a span and
/// a `BinOpKind` (either `&&` or `||` depending on what was ambig
i
ous) if it is determined
/// that the current expression parsed is ambig
i
ous and will break in future.
/// `&&` and `||` in a if-let statement be unambig
u
ous. This function returns a span and
/// a `BinOpKind` (either `&&` or `||` depending on what was ambig
u
ous) if it is determined
/// that the current expression parsed is ambig
u
ous and will break in future.
fn
while_if_let_expr_ambiguity
(
&
self
,
expr
:
&
P
<
Expr
>
)
->
Option
<
(
Span
,
BinOpKind
)
>
{
debug!
(
"while_if_let_expr_ambiguity: expr.node: {:?}"
,
expr
.node
);
match
&
expr
.node
{
...
...
@@ -203,12 +203,12 @@ fn while_if_let_expr_ambiguity(&self, expr: &P<Expr>) -> Option<(Span, BinOpKind
Some
((
expr
.span
,
op
.node
))
},
ExprKind
::
Range
(
ref
lhs
,
ref
rhs
,
_
)
=>
{
let
lhs_ambig
i
ous
=
lhs
.as_ref
()
let
lhs_ambig
u
ous
=
lhs
.as_ref
()
.and_then
(|
lhs
|
self
.while_if_let_expr_ambiguity
(
lhs
));
let
rhs_ambig
i
ous
=
rhs
.as_ref
()
let
rhs_ambig
u
ous
=
rhs
.as_ref
()
.and_then
(|
rhs
|
self
.while_if_let_expr_ambiguity
(
rhs
));
lhs_ambig
ious
.or
(
rhs_ambigi
ous
)
lhs_ambig
uous
.or
(
rhs_ambigu
ous
)
}
_
=>
None
,
}
...
...
src/librustc_target/abi/mod.rs
浏览文件 @
4f14bfdc
...
...
@@ -430,7 +430,7 @@ pub fn max_for_offset(offset: Size) -> Align {
}
/// Lower the alignment, if necessary, such that the given offset
/// is aligned to it (the offset is a multiple of the aligment).
/// is aligned to it (the offset is a multiple of the alig
n
ment).
pub
fn
restrict_for_offset
(
self
,
offset
:
Size
)
->
Align
{
self
.min
(
Align
::
max_for_offset
(
offset
))
}
...
...
src/librustc_typeck/check/mod.rs
浏览文件 @
4f14bfdc
...
...
@@ -5198,7 +5198,7 @@ pub fn instantiate_value_path(&self,
}
else
{
// If no type arguments were provided, we have to infer them.
// This case also occurs as a result of some malformed input, e.g.
// a lifetime argument being given instead of a type paramter.
// a lifetime argument being given instead of a type param
e
ter.
// Using inference instead of `Error` gives better error messages.
self
.var_for_def
(
span
,
param
)
}
...
...
src/librustc_typeck/check/wfcheck.rs
浏览文件 @
4f14bfdc
...
...
@@ -674,7 +674,7 @@ fn check_existential_types<'a, 'fcx, 'gcx, 'tcx>(
}
// if may_define_existential_type
// now register the bounds on the parameters of the existential type
// so the parameters given by the function need to fulfil them
// so the parameters given by the function need to fulfil
l
them
// ```rust
// existential type Foo<T: Bar>: 'static;
// fn foo<U>() -> Foo<U> { .. *}
...
...
src/librustc_typeck/coherence/builtin.rs
浏览文件 @
4f14bfdc
...
...
@@ -269,7 +269,7 @@ pub fn coerce_unsized_info<'a, 'gcx>(gcx: TyCtxt<'a, 'gcx, 'gcx>,
// exactly one (non-phantom) field has changed its
// type, which we will expect to be the pointer that
// is becoming fat (we could probably generalize this
// to mutiple thin pointers of the same type becoming
// to mu
l
tiple thin pointers of the same type becoming
// fat, but we don't). In this case:
//
// - `extra` has type `T` before and type `T` after
...
...
src/libstd/sync/mod.rs
浏览文件 @
4f14bfdc
...
...
@@ -97,7 +97,7 @@
//! - A **multiprocessor** system executing multiple hardware threads
//! at the same time: In multi-threaded scenarios, you can use two
//! kinds of primitives to deal with synchronization:
//! - [memory fences] to ensure memory accesses are made visib
i
le to
//! - [memory fences] to ensure memory accesses are made visible to
//! other CPUs in the right order.
//! - [atomic operations] to ensure simultaneous access to the same
//! memory location doesn't lead to undefined behavior.
...
...
src/libstd/sync/once.rs
浏览文件 @
4f14bfdc
...
...
@@ -290,8 +290,8 @@ pub fn call_once_force<F>(&self, f: F) where F: FnOnce(&OnceState) {
}
/// Returns true if some `call_once` call has completed
/// successfuly. Specifically, `is_completed` will return false in
/// the following situ
t
ations:
/// successful
l
y. Specifically, `is_completed` will return false in
/// the following situations:
/// * `call_once` was not called at all,
/// * `call_once` was called, but has not yet completed,
/// * the `Once` instance is poisoned
...
...
src/libsyntax/config.rs
浏览文件 @
4f14bfdc
...
...
@@ -96,7 +96,7 @@ pub fn process_cfg_attrs<T: HasAttrs>(&mut self, node: T) -> T {
/// when the configuration predicate is true, or otherwise expand into an
/// empty list of attributes.
///
/// Gives a compiler warning when the `cfg_attr` contains no attribtes and
/// Gives a compiler warning when the `cfg_attr` contains no attrib
u
tes and
/// is in the original source file. Gives a compiler error if the syntax of
/// the attribute is incorrect
fn
process_cfg_attr
(
&
mut
self
,
attr
:
ast
::
Attribute
)
->
Vec
<
ast
::
Attribute
>
{
...
...
@@ -138,7 +138,7 @@ fn process_cfg_attr(&mut self, attr: ast::Attribute) -> Vec<ast::Attribute> {
};
// Check feature gate and lint on zero attributes in source. Even if the feature is gated,
// we still compute as if it wasn't, since the emitted error will stop compilation futher
// we still compute as if it wasn't, since the emitted error will stop compilation fu
r
ther
// along the compilation.
match
(
expanded_attrs
.len
(),
gate_cfg_attr_multi
)
{
(
0
,
false
)
=>
{
...
...
src/test/run-pass/issues/issue-18804/main.rs
浏览文件 @
4f14bfdc
...
...
@@ -9,7 +9,7 @@
// except according to those terms.
// run-pass
// Test for issue #18804, #[linkage] does not propagate th
or
ugh generic
// Test for issue #18804, #[linkage] does not propagate th
ro
ugh generic
// functions. Failure results in a linker error.
// ignore-asmjs no weak symbol support
...
...
src/test/ui/block-result/unexpected-return-on-unit.rs
浏览文件 @
4f14bfdc
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test that we do some basic error correcton in the tokeniser (and don't spew
// Test that we do some basic error correct
i
on in the tokeniser (and don't spew
// too many bogus errors).
fn
foo
()
->
usize
{
...
...
src/test/ui/conditional-compilation/cfg-attr-multi-false.rs
浏览文件 @
4f14bfdc
// Test that cfg_attr doesn't emit any attributes when the
// configuation variable is false. This mirrors `cfg-attr-multi-true.rs`
// configu
r
ation variable is false. This mirrors `cfg-attr-multi-true.rs`
// compile-pass
...
...
src/test/ui/nll/issue-21232-partial-init-and-use.rs
浏览文件 @
4f14bfdc
...
...
@@ -66,7 +66,7 @@ impl<F> R<F> { fn new(f: F) -> Self { R { w: 0, f } } }
// It got pretty monotonous writing the same code over and over, and I
// feared I would forget details. So I abstracted some desiderata into
// macros. But I left the initialization code inline, because that's
// where the errors for #54986 will be emited.
// where the errors for #54986 will be emit
t
ed.
macro_rules!
use_fully
{
(
struct
$s:expr
)
=>
{
{
...
...
src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.rs
浏览文件 @
4f14bfdc
// rust-lang/rust#52059: Regardless of whether you are moving out of a
// Drop type or just introducing an inadvert
a
nt alias via a borrow of
// Drop type or just introducing an inadvert
e
nt alias via a borrow of
// one of its fields, it is useful to be reminded of the significance
// of the fact that the type implements Drop.
...
...
src/test/ui/resolve/token-error-correct-2.rs
浏览文件 @
4f14bfdc
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test that we do some basic error correcton in the tokeniser (and don't ICE).
// Test that we do some basic error correct
i
on in the tokeniser (and don't ICE).
fn
main
()
{
if
foo
{
...
...
src/test/ui/resolve/token-error-correct-3.rs
浏览文件 @
4f14bfdc
...
...
@@ -10,7 +10,7 @@
// ignore-cloudabi no std::fs support
// Test that we do some basic error correcton in the tokeniser (and don't spew
// Test that we do some basic error correct
i
on in the tokeniser (and don't spew
// too many bogus errors).
pub
mod
raw
{
...
...
src/test/ui/resolve/token-error-correct.rs
浏览文件 @
4f14bfdc
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test that we do some basic error correcton in the tokeniser.
// Test that we do some basic error correct
i
on in the tokeniser.
fn
main
()
{
foo
(
bar
(;
...
...
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.rs
浏览文件 @
4f14bfdc
...
...
@@ -19,22 +19,22 @@ fn main() {
use
std
::
ops
::
Range
;
if
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
if
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
||
false
{
}
//~^ ERROR ambig
i
ous use of `||`
//~^ ERROR ambig
u
ous use of `||`
while
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
while
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
||
false
{
}
//~^ ERROR ambig
i
ous use of `||`
//~^ ERROR ambig
u
ous use of `||`
if
let
true
=
false
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
while
let
true
=
(
1
==
2
)
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
// The following cases are not an error as parenthesis are used to
// clarify intent:
...
...
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
浏览文件 @
4f14bfdc
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:21:47
|
LL | if let Range { start: _, end: _ } = true..true && false { }
...
...
@@ -7,7 +7,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `||`
error: ambig
u
ous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:24:47
|
LL | if let Range { start: _, end: _ } = true..true || false { }
...
...
@@ -16,7 +16,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:27:50
|
LL | while let Range { start: _, end: _ } = true..true && false { }
...
...
@@ -25,7 +25,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `||`
error: ambig
u
ous use of `||`
--> $DIR/syntax-ambiguity-2015.rs:30:50
|
LL | while let Range { start: _, end: _ } = true..true || false { }
...
...
@@ -34,7 +34,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:33:19
|
LL | if let true = false && false { }
...
...
@@ -43,7 +43,7 @@ LL | if let true = false && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2015.rs:36:22
|
LL | while let true = (1 == 2) && false { }
...
...
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.rs
浏览文件 @
4f14bfdc
...
...
@@ -19,22 +19,22 @@ fn main() {
use
std
::
ops
::
Range
;
if
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
if
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
||
false
{
}
//~^ ERROR ambig
i
ous use of `||`
//~^ ERROR ambig
u
ous use of `||`
while
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
while
let
Range
{
start
:
_
,
end
:
_
}
=
true
..
true
||
false
{
}
//~^ ERROR ambig
i
ous use of `||`
//~^ ERROR ambig
u
ous use of `||`
if
let
true
=
false
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
while
let
true
=
(
1
==
2
)
&&
false
{
}
//~^ ERROR ambig
i
ous use of `&&`
//~^ ERROR ambig
u
ous use of `&&`
// The following cases are not an error as parenthesis are used to
// clarify intent:
...
...
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2018.stderr
浏览文件 @
4f14bfdc
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:21:47
|
LL | if let Range { start: _, end: _ } = true..true && false { }
...
...
@@ -7,7 +7,7 @@ LL | if let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `||`
error: ambig
u
ous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:24:47
|
LL | if let Range { start: _, end: _ } = true..true || false { }
...
...
@@ -16,7 +16,7 @@ LL | if let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:27:50
|
LL | while let Range { start: _, end: _ } = true..true && false { }
...
...
@@ -25,7 +25,7 @@ LL | while let Range { start: _, end: _ } = true..true && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `||`
error: ambig
u
ous use of `||`
--> $DIR/syntax-ambiguity-2018.rs:30:50
|
LL | while let Range { start: _, end: _ } = true..true || false { }
...
...
@@ -34,7 +34,7 @@ LL | while let Range { start: _, end: _ } = true..true || false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:33:19
|
LL | if let true = false && false { }
...
...
@@ -43,7 +43,7 @@ LL | if let true = false && false { }
= note: this will be a error until the `let_chains` feature is stabilized
= note: see rust-lang/rust#53668 for more information
error: ambig
i
ous use of `&&`
error: ambig
u
ous use of `&&`
--> $DIR/syntax-ambiguity-2018.rs:36:22
|
LL | while let true = (1 == 2) && false { }
...
...
src/test/ui/rust-2018/edition-lint-infer-outlives.fixed
浏览文件 @
4f14bfdc
...
...
@@ -24,7 +24,7 @@ use std::fmt::{Debug, Display};
// • one generic parameter (T) bound inline
// • one parameter (T) with a where clause
// • two parameters (T and U), both bound inline
// • two paramters (T and U), one bound inline, one with a where clause
// • two param
e
ters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses
//
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1
...
...
src/test/ui/rust-2018/edition-lint-infer-outlives.rs
浏览文件 @
4f14bfdc
...
...
@@ -24,7 +24,7 @@
// • one generic parameter (T) bound inline
// • one parameter (T) with a where clause
// • two parameters (T and U), both bound inline
// • two paramters (T and U), one bound inline, one with a where clause
// • two param
e
ters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses
//
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1
...
...
src/test/ui/specialization/issue-52050.rs
浏览文件 @
4f14bfdc
...
...
@@ -12,7 +12,7 @@
// Regression test for #52050: when inserting the blanket impl `I`
// into the tree, we had to replace the child node for `Foo`, which
// led to the struture of the tree being messed up.
// led to the stru
c
ture of the tree being messed up.
use
std
::
iter
::
Iterator
;
...
...
src/tools/tidy/src/pal.rs
浏览文件 @
4f14bfdc
...
...
@@ -163,7 +163,7 @@ fn check_cfgs(contents: &mut String, file: &Path,
fn
find_test_mod
(
contents
:
&
str
)
->
usize
{
if
let
Some
(
mod_tests_idx
)
=
contents
.find
(
"mod tests"
)
{
// Also capture a previos line indicating "mod tests" in cfg-ed out
// Also capture a previo
u
s line indicating "mod tests" in cfg-ed out
let
prev_newline_idx
=
contents
[
..
mod_tests_idx
]
.rfind
(
'\n'
)
.unwrap_or
(
mod_tests_idx
);
let
prev_newline_idx
=
contents
[
..
prev_newline_idx
]
.rfind
(
'\n'
);
if
let
Some
(
nl
)
=
prev_newline_idx
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录