Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
6f91c32d
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,发现更多精彩内容 >>
未验证
提交
6f91c32d
编写于
11月 25, 2020
作者:
A
Aaron Hill
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix new 'unnecessary trailing semicolon' warnings
上级
db0d0e8c
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
39 addition
and
39 deletion
+39
-39
compiler/rustc_codegen_ssa/src/mir/block.rs
compiler/rustc_codegen_ssa/src/mir/block.rs
+1
-1
compiler/rustc_lint/src/builtin.rs
compiler/rustc_lint/src/builtin.rs
+1
-1
compiler/rustc_lint/src/types.rs
compiler/rustc_lint/src/types.rs
+1
-1
compiler/rustc_middle/src/mir/visit.rs
compiler/rustc_middle/src/mir/visit.rs
+3
-3
compiler/rustc_middle/src/ty/instance.rs
compiler/rustc_middle/src/ty/instance.rs
+1
-1
compiler/rustc_mir/src/interpret/util.rs
compiler/rustc_mir/src/interpret/util.rs
+1
-1
compiler/rustc_ty_utils/src/ty.rs
compiler/rustc_ty_utils/src/ty.rs
+1
-1
compiler/rustc_typeck/src/check/check.rs
compiler/rustc_typeck/src/check/check.rs
+1
-1
library/alloc/tests/vec.rs
library/alloc/tests/vec.rs
+3
-3
library/core/src/fmt/mod.rs
library/core/src/fmt/mod.rs
+1
-1
library/core/src/future/poll_fn.rs
library/core/src/future/poll_fn.rs
+1
-1
library/core/src/mem/maybe_uninit.rs
library/core/src/mem/maybe_uninit.rs
+1
-1
library/core/tests/ptr.rs
library/core/tests/ptr.rs
+1
-1
library/test/src/lib.rs
library/test/src/lib.rs
+2
-2
src/test/ui/associated-type-bounds/dyn-impl-trait-type.rs
src/test/ui/associated-type-bounds/dyn-impl-trait-type.rs
+1
-1
src/test/ui/associated-type-bounds/dyn-lcsit.rs
src/test/ui/associated-type-bounds/dyn-lcsit.rs
+1
-1
src/test/ui/associated-type-bounds/dyn-rpit-and-let.rs
src/test/ui/associated-type-bounds/dyn-rpit-and-let.rs
+1
-1
src/test/ui/associated-type-bounds/lcsit.rs
src/test/ui/associated-type-bounds/lcsit.rs
+1
-1
src/test/ui/associated-type-bounds/rpit.rs
src/test/ui/associated-type-bounds/rpit.rs
+1
-1
src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs
src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs
+1
-1
src/test/ui/const-generics/min_const_generics/macro.rs
src/test/ui/const-generics/min_const_generics/macro.rs
+5
-5
src/test/ui/issues/issue-10767.rs
src/test/ui/issues/issue-10767.rs
+1
-1
src/test/ui/issues/issue-2074.rs
src/test/ui/issues/issue-2074.rs
+2
-2
src/test/ui/macros/macro-2.rs
src/test/ui/macros/macro-2.rs
+1
-1
src/test/ui/macros/macro-path.rs
src/test/ui/macros/macro-path.rs
+1
-1
src/test/ui/structs-enums/nested-enum-same-names.rs
src/test/ui/structs-enums/nested-enum-same-names.rs
+2
-2
src/test/ui/try-is-identifier-edition2015.rs
src/test/ui/try-is-identifier-edition2015.rs
+1
-1
src/test/ui/zero-sized/zero-size-type-destructors.rs
src/test/ui/zero-sized/zero-size-type-destructors.rs
+1
-1
未找到文件。
compiler/rustc_codegen_ssa/src/mir/block.rs
浏览文件 @
6f91c32d
...
...
@@ -451,7 +451,7 @@ enum AssertIntrinsic {
Inhabited
,
ZeroValid
,
UninitValid
,
}
;
}
let
panic_intrinsic
=
intrinsic
.and_then
(|
i
|
match
i
{
sym
::
assert_inhabited
=>
Some
(
AssertIntrinsic
::
Inhabited
),
sym
::
assert_zero_valid
=>
Some
(
AssertIntrinsic
::
ZeroValid
),
...
...
compiler/rustc_lint/src/builtin.rs
浏览文件 @
6f91c32d
...
...
@@ -2345,7 +2345,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &hir::Expr<'_>) {
enum
InitKind
{
Zeroed
,
Uninit
,
}
;
}
/// Information about why a type cannot be initialized this way.
/// Contains an error message and optionally a span to point at.
...
...
compiler/rustc_lint/src/types.rs
浏览文件 @
6f91c32d
...
...
@@ -1131,7 +1131,7 @@ fn emit_ffi_unsafe_type_lint(
fn
check_for_opaque_ty
(
&
mut
self
,
sp
:
Span
,
ty
:
Ty
<
'tcx
>
)
->
bool
{
struct
ProhibitOpaqueTypes
<
'a
,
'tcx
>
{
cx
:
&
'a
LateContext
<
'tcx
>
,
}
;
}
impl
<
'a
,
'tcx
>
ty
::
fold
::
TypeVisitor
<
'tcx
>
for
ProhibitOpaqueTypes
<
'a
,
'tcx
>
{
type
BreakTy
=
Ty
<
'tcx
>
;
...
...
compiler/rustc_middle/src/mir/visit.rs
浏览文件 @
6f91c32d
...
...
@@ -254,7 +254,7 @@ fn super_body(
macro_rules!
basic_blocks
{
(
mut
)
=>
(
body
.basic_blocks_mut
()
.iter_enumerated_mut
());
()
=>
(
body
.basic_blocks
()
.iter_enumerated
());
}
;
}
for
(
bb
,
data
)
in
basic_blocks!
(
$
(
$mutability
)
?
)
{
self
.visit_basic_block_data
(
bb
,
data
);
}
...
...
@@ -275,7 +275,7 @@ fn super_body(
macro_rules!
type_annotations
{
(
mut
)
=>
(
body
.user_type_annotations
.iter_enumerated_mut
());
()
=>
(
body
.user_type_annotations
.iter_enumerated
());
}
;
}
for
(
index
,
annotation
)
in
type_annotations!
(
$
(
$mutability
)
?
)
{
self
.visit_user_type_annotation
(
...
...
@@ -909,7 +909,7 @@ fn visit_location(
macro_rules!
basic_blocks
{
(
mut
)
=>
(
body
.basic_blocks_mut
());
()
=>
(
body
.basic_blocks
());
}
;
}
let
basic_block
=
&
$
(
$mutability
)
?
basic_blocks!
(
$
(
$mutability
)
?
)[
location
.block
];
if
basic_block
.statements
.len
()
==
location
.statement_index
{
if
let
Some
(
ref
$
(
$mutability
)
?
terminator
)
=
basic_block
.terminator
{
...
...
compiler/rustc_middle/src/ty/instance.rs
浏览文件 @
6f91c32d
...
...
@@ -540,7 +540,7 @@ fn polymorphize<'tcx>(
struct
PolymorphizationFolder
<
'tcx
>
{
tcx
:
TyCtxt
<
'tcx
>
,
}
;
}
impl
ty
::
TypeFolder
<
'tcx
>
for
PolymorphizationFolder
<
'tcx
>
{
fn
tcx
<
'a
>
(
&
'a
self
)
->
TyCtxt
<
'tcx
>
{
...
...
compiler/rustc_mir/src/interpret/util.rs
浏览文件 @
6f91c32d
...
...
@@ -15,7 +15,7 @@
struct
UsedParamsNeedSubstVisitor
<
'tcx
>
{
tcx
:
TyCtxt
<
'tcx
>
,
}
;
}
impl
<
'tcx
>
TypeVisitor
<
'tcx
>
for
UsedParamsNeedSubstVisitor
<
'tcx
>
{
type
BreakTy
=
();
...
...
compiler/rustc_ty_utils/src/ty.rs
浏览文件 @
6f91c32d
...
...
@@ -309,7 +309,7 @@ enum NodeKind {
InherentImpl
,
Fn
,
Other
,
}
;
}
let
node_kind
=
match
node
{
Node
::
TraitItem
(
item
)
=>
match
item
.kind
{
...
...
compiler/rustc_typeck/src/check/check.rs
浏览文件 @
6f91c32d
...
...
@@ -477,7 +477,7 @@ pub(super) fn check_opaque_for_inheriting_lifetimes(
struct
ProhibitOpaqueVisitor
<
'tcx
>
{
opaque_identity_ty
:
Ty
<
'tcx
>
,
generics
:
&
'tcx
ty
::
Generics
,
}
;
}
impl
<
'tcx
>
ty
::
fold
::
TypeVisitor
<
'tcx
>
for
ProhibitOpaqueVisitor
<
'tcx
>
{
type
BreakTy
=
Option
<
Ty
<
'tcx
>>
;
...
...
library/alloc/tests/vec.rs
浏览文件 @
6f91c32d
...
...
@@ -919,7 +919,7 @@ fn test_from_iter_partially_drained_in_place_specialization() {
#[test]
fn
test_from_iter_specialization_with_iterator_adapters
()
{
fn
assert_in_place_trait
<
T
:
InPlaceIterable
>
(
_
:
&
T
)
{}
;
fn
assert_in_place_trait
<
T
:
InPlaceIterable
>
(
_
:
&
T
)
{}
let
src
:
Vec
<
usize
>
=
vec!
[
0u
size
;
256
];
let
srcptr
=
src
.as_ptr
();
let
iter
=
src
...
...
@@ -1198,7 +1198,7 @@ fn drain_filter_consumed_panic() {
struct
Check
{
index
:
usize
,
drop_counts
:
Rc
<
Mutex
<
Vec
<
usize
>>>
,
}
;
}
impl
Drop
for
Check
{
fn
drop
(
&
mut
self
)
{
...
...
@@ -1250,7 +1250,7 @@ fn drain_filter_unconsumed_panic() {
struct
Check
{
index
:
usize
,
drop_counts
:
Rc
<
Mutex
<
Vec
<
usize
>>>
,
}
;
}
impl
Drop
for
Check
{
fn
drop
(
&
mut
self
)
{
...
...
library/core/src/fmt/mod.rs
浏览文件 @
6f91c32d
...
...
@@ -1182,7 +1182,7 @@ fn wrap_buf<'b, 'c, F>(&'b mut self, wrap: F) -> Formatter<'c>
/// ```
/// use std::fmt;
///
/// struct Foo { nb: i32 }
;
/// struct Foo { nb: i32 }
///
/// impl Foo {
/// fn new(nb: i32) -> Foo {
...
...
library/core/src/future/poll_fn.rs
浏览文件 @
6f91c32d
...
...
@@ -21,7 +21,7 @@
///
/// let read_future = poll_fn(read_line);
/// assert_eq!(read_future.await, "Hello, World!".to_owned());
/// # }
;
/// # }
/// ```
#[unstable(feature
=
"future_poll_fn"
,
issue
=
"72302"
)]
pub
fn
poll_fn
<
T
,
F
>
(
f
:
F
)
->
PollFn
<
F
>
...
...
library/core/src/mem/maybe_uninit.rs
浏览文件 @
6f91c32d
...
...
@@ -348,7 +348,7 @@ pub const fn uninit() -> MaybeUninit<T> {
/// ```rust,no_run
/// use std::mem::MaybeUninit;
///
/// enum NotZero { One = 1, Two = 2 }
;
/// enum NotZero { One = 1, Two = 2 }
///
/// let x = MaybeUninit::<(u8, NotZero)>::zeroed();
/// let x = unsafe { x.assume_init() };
...
...
library/core/tests/ptr.rs
浏览文件 @
6f91c32d
...
...
@@ -18,7 +18,7 @@ fn test() {
struct
Pair
{
fst
:
isize
,
snd
:
isize
,
}
;
}
let
mut
p
=
Pair
{
fst
:
10
,
snd
:
20
};
let
pptr
:
*
mut
Pair
=
&
mut
p
;
let
iptr
:
*
mut
isize
=
pptr
as
*
mut
isize
;
...
...
library/test/src/lib.rs
浏览文件 @
6f91c32d
...
...
@@ -265,14 +265,14 @@ fn get_timed_out_tests(running_tests: &mut TestMap) -> Vec<TestDesc> {
running_tests
.remove
(
test
);
}
timed_out
}
;
}
fn
calc_timeout
(
running_tests
:
&
TestMap
)
->
Option
<
Duration
>
{
running_tests
.values
()
.min
()
.map
(|
next_timeout
|
{
let
now
=
Instant
::
now
();
if
*
next_timeout
>=
now
{
*
next_timeout
-
now
}
else
{
Duration
::
new
(
0
,
0
)
}
})
}
;
}
if
concurrency
==
1
{
while
!
remaining
.is_empty
()
{
...
...
src/test/ui/associated-type-bounds/dyn-impl-trait-type.rs
浏览文件 @
6f91c32d
...
...
@@ -30,7 +30,7 @@ fn def_et3() -> Et3 {
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
&
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
Box
::
new
(
A
)
}
pub
fn
use_et3
()
{
...
...
src/test/ui/associated-type-bounds/dyn-lcsit.rs
浏览文件 @
6f91c32d
...
...
@@ -33,7 +33,7 @@ fn assert_forall_tr2<T: for<'a> Tr2<'a>>(_: T) {}
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
&
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
&
A
};
pub
fn
use_et3
()
{
...
...
src/test/ui/associated-type-bounds/dyn-rpit-and-let.rs
浏览文件 @
6f91c32d
...
...
@@ -35,7 +35,7 @@ fn def_et3() -> Box<dyn Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
&
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
let
x
/* : Box<dyn Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>> */
=
Box
::
new
(
A
);
x
...
...
src/test/ui/associated-type-bounds/lcsit.rs
浏览文件 @
6f91c32d
...
...
@@ -39,7 +39,7 @@ fn assert_forall_tr2<T: for<'a> Tr2<'a>>(_: T) {}
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
&
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
let
x
:
impl
Tr1
<
As1
:
Clone
+
Iterator
<
Item
:
Add
<
u8
,
Output
:
Into
<
u8
>>>>
=
A
;
x
};
...
...
src/test/ui/associated-type-bounds/rpit.rs
浏览文件 @
6f91c32d
...
...
@@ -27,7 +27,7 @@ fn def_et3() -> impl Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
A
}
...
...
src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs
浏览文件 @
6f91c32d
...
...
@@ -31,7 +31,7 @@ fn def_et3() -> Et3 {
impl
Tr1
for
A
{
type
As1
=
core
::
ops
::
Range
<
u8
>
;
fn
mk
(
self
)
->
Self
::
As1
{
0
..
10
}
}
;
}
A
}
pub
fn
use_et3
()
{
...
...
src/test/ui/const-generics/min_const_generics/macro.rs
浏览文件 @
6f91c32d
...
...
@@ -15,14 +15,14 @@ impl<const N: usize> Marker<N> for Example<N> {}
fn
make_marker
()
->
impl
Marker
<
{
#[macro_export]
macro_rules!
const_macro
{
()
=>
{{
3
}}
}
;
inline!
()
macro_rules!
const_macro
{
()
=>
{{
3
}}
}
inline!
()
}
>
{
Example
::
<
{
const_macro!
()
}
>
}
fn
from_marker
(
_
:
impl
Marker
<
{
#[macro_export]
macro_rules!
inline
{
()
=>
{{
3
}}
}
;
inline!
()
macro_rules!
inline
{
()
=>
{{
3
}}
}
inline!
()
}
>
)
{}
fn
main
()
{
...
...
@@ -30,7 +30,7 @@ fn main() {
#[macro_export]
macro_rules!
gimme_a_const
{
(
$rusty
:
ident
)
=>
{{
let
$rusty
=
3
;
*&
$rusty
}}
}
;
}
gimme_a_const!
(
run
)
}
>
;
...
...
@@ -42,13 +42,13 @@ fn main() {
let
_
ok
:
[
u8
;
{
#[macro_export]
macro_rules!
const_two
{
()
=>
{{
2
}}
}
;
macro_rules!
const_two
{
()
=>
{{
2
}}
}
const_two!
()
}];
let
_
ok
=
[
0
;
{
#[macro_export]
macro_rules!
const_three
{
()
=>
{{
3
}}
}
;
macro_rules!
const_three
{
()
=>
{{
3
}}
}
const_three!
()
}];
let
_
ok
=
[
0
;
const_three!
()];
...
...
src/test/ui/issues/issue-10767.rs
浏览文件 @
6f91c32d
...
...
@@ -5,6 +5,6 @@
pub
fn
main
()
{
fn
f
()
{
}
;
}
let
_
:
Box
<
fn
()
>
=
box
(
f
as
fn
());
}
src/test/ui/issues/issue-2074.rs
浏览文件 @
6f91c32d
...
...
@@ -5,11 +5,11 @@
pub
fn
main
()
{
let
one
=
||
{
enum
r
{
a
}
;
enum
r
{
a
}
r
::
a
as
usize
};
let
two
=
||
{
enum
r
{
a
}
;
enum
r
{
a
}
r
::
a
as
usize
};
one
();
two
();
...
...
src/test/ui/macros/macro-2.rs
浏览文件 @
6f91c32d
...
...
@@ -3,7 +3,7 @@ pub fn main() {
macro_rules!
mylambda_tt
{
(
$x:ident
,
$body:expr
)
=>
({
fn
f
(
$x
:
isize
)
->
isize
{
return
$body
;
}
;
fn
f
(
$x
:
isize
)
->
isize
{
return
$body
;
}
f
})
}
...
...
src/test/ui/macros/macro-path.rs
浏览文件 @
6f91c32d
...
...
@@ -8,7 +8,7 @@ mod m {
macro_rules!
foo
{
(
$p:path
)
=>
({
fn
f
()
->
$p
{
10
}
;
fn
f
()
->
$p
{
10
}
f
()
})
}
...
...
src/test/ui/structs-enums/nested-enum-same-names.rs
浏览文件 @
6f91c32d
...
...
@@ -17,10 +17,10 @@
pub
struct
Foo
;
impl
Foo
{
pub
fn
foo
()
{
enum
Panic
{
Common
}
;
enum
Panic
{
Common
}
}
pub
fn
bar
()
{
enum
Panic
{
Common
}
;
enum
Panic
{
Common
}
}
}
...
...
src/test/ui/try-is-identifier-edition2015.rs
浏览文件 @
6f91c32d
...
...
@@ -5,7 +5,7 @@
fn
main
()
{
let
try
=
2
;
struct
try
{
try
:
u32
}
;
struct
try
{
try
:
u32
}
let
try
:
try
=
try
{
try
};
assert_eq!
(
try
.try
,
2
);
}
src/test/ui/zero-sized/zero-size-type-destructors.rs
浏览文件 @
6f91c32d
...
...
@@ -10,7 +10,7 @@ impl Drop for Foo {
fn
drop
(
&
mut
self
)
{
unsafe
{
destructions
-=
1
};
}
}
;
}
let
_
x
=
[
Foo
,
Foo
,
Foo
];
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录