Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
81e49597
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,发现更多精彩内容 >>
提交
81e49597
编写于
1月 28, 2018
作者:
P
penpalperson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added inline to fmt for debug implementations of primitives.
上级
771873c8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
0 deletion
+14
-0
src/libcore/array.rs
src/libcore/array.rs
+1
-0
src/libcore/fmt/float.rs
src/libcore/fmt/float.rs
+1
-0
src/libcore/fmt/mod.rs
src/libcore/fmt/mod.rs
+10
-0
src/libcore/fmt/num.rs
src/libcore/fmt/num.rs
+1
-0
src/libcore/ptr.rs
src/libcore/ptr.rs
+1
-0
未找到文件。
src/libcore/array.rs
浏览文件 @
81e49597
...
...
@@ -185,6 +185,7 @@ fn hash<H: hash::Hasher>(&self, state: &mut H) {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
T
:
fmt
::
Debug
>
fmt
::
Debug
for
[
T
;
$N
]
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
fmt
::
Debug
::
fmt
(
&&
self
[
..
],
f
)
}
...
...
src/libcore/fmt/float.rs
浏览文件 @
81e49597
...
...
@@ -125,6 +125,7 @@ fn float_to_exponential_common<T>(fmt: &mut Formatter, num: &T, upper: bool) ->
(
$ty:ident
)
=>
(
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
Debug
for
$ty
{
#[inline]
fn
fmt
(
&
self
,
fmt
:
&
mut
Formatter
)
->
Result
{
float_to_decimal_common
(
fmt
,
self
,
true
,
1
)
}
...
...
src/libcore/fmt/mod.rs
浏览文件 @
81e49597
...
...
@@ -1558,10 +1558,12 @@ fn fmt(&self, f: &mut Formatter) -> Result {
$
(
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
'a
,
T
:
?
Sized
+
$tr
>
$tr
for
&
'a
T
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
$tr
::
fmt
(
&**
self
,
f
)
}
}
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
'a
,
T
:
?
Sized
+
$tr
>
$tr
for
&
'a
mut
T
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
$tr
::
fmt
(
&**
self
,
f
)
}
}
)
*
...
...
@@ -1586,6 +1588,7 @@ fn fmt(&self, _: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
Debug
for
bool
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
Display
::
fmt
(
self
,
f
)
}
...
...
@@ -1600,6 +1603,7 @@ fn fmt(&self, f: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
Debug
for
str
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
f
.write_char
(
'"'
)
?
;
let
mut
from
=
0
;
...
...
@@ -1628,6 +1632,7 @@ fn fmt(&self, f: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
Debug
for
char
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
f
.write_char
(
'\''
)
?
;
for
c
in
self
.escape_debug
()
{
...
...
@@ -1701,10 +1706,12 @@ fn fmt(&self, f: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
T
:
?
Sized
>
Debug
for
*
const
T
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
Pointer
::
fmt
(
self
,
f
)
}
}
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
T
:
?
Sized
>
Debug
for
*
mut
T
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
Pointer
::
fmt
(
self
,
f
)
}
}
...
...
@@ -1718,6 +1725,7 @@ fn fmt(&self, f: &mut Formatter) -> Result { Pointer::fmt(self, f) }
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
$
(
$name:Debug
),
*>
Debug
for
(
$
(
$name
,)
*
)
where
last_type!
(
$
(
$name
,)
+
):
?
Sized
{
#[allow(non_snake_case,
unused_assignments,
deprecated)]
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
let
mut
builder
=
f
.debug_tuple
(
""
);
let
(
$
(
ref
$name
,)
*
)
=
*
self
;
...
...
@@ -1741,6 +1749,7 @@ fn fmt(&self, f: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
<
T
:
Debug
>
Debug
for
[
T
]
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
f
.debug_list
()
.entries
(
self
.iter
())
.finish
()
}
...
...
@@ -1748,6 +1757,7 @@ fn fmt(&self, f: &mut Formatter) -> Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
Debug
for
()
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
Formatter
)
->
Result
{
f
.pad
(
"()"
)
}
...
...
src/libcore/fmt/num.rs
浏览文件 @
81e49597
...
...
@@ -157,6 +157,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
(
$T:ident
)
=>
{
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
impl
fmt
::
Debug
for
$T
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
fmt
::
Display
::
fmt
(
self
,
f
)
}
...
...
src/libcore/ptr.rs
浏览文件 @
81e49597
...
...
@@ -2202,6 +2202,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
#[stable(feature
=
"fnptr_impls"
,
since
=
"1.4.0"
)]
impl
<
Ret
,
$
(
$Arg
),
*>
fmt
::
Debug
for
$FnTy
{
#[inline]
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
fmt
::
Pointer
::
fmt
(
&
(
*
self
as
*
const
()),
f
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录