Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e60eaf59
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,发现更多精彩内容 >>
提交
e60eaf59
编写于
5月 19, 2018
作者:
V
Vadim Petrochenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix naming conventions for new lints
上级
c2d46037
变更
65
隐藏空白更改
内联
并排
Showing
65 changed file
with
111 addition
and
108 deletion
+111
-108
src/doc/rustc/src/lints/listing/allowed-by-default.md
src/doc/rustc/src/lints/listing/allowed-by-default.md
+1
-1
src/librustc/hir/lowering.rs
src/librustc/hir/lowering.rs
+1
-1
src/librustc/lint/builtin.rs
src/librustc/lint/builtin.rs
+12
-12
src/librustc/lint/mod.rs
src/librustc/lint/mod.rs
+1
-1
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/resolve_lifetime.rs
+3
-3
src/librustc_lint/builtin.rs
src/librustc_lint/builtin.rs
+6
-6
src/librustc_lint/lib.rs
src/librustc_lint/lib.rs
+11
-8
src/librustc_resolve/lib.rs
src/librustc_resolve/lib.rs
+1
-1
src/librustc_typeck/check/method/probe.rs
src/librustc_typeck/check/method/probe.rs
+1
-1
src/test/compile-fail/trait-bounds-not-on-struct.rs
src/test/compile-fail/trait-bounds-not-on-struct.rs
+1
-1
src/test/compile-fail/useless_comment.rs
src/test/compile-fail/useless_comment.rs
+1
-1
src/test/ui-fulldeps/unnecessary-extern-crate.rs
src/test/ui-fulldeps/unnecessary-extern-crate.rs
+1
-1
src/test/ui-fulldeps/unnecessary-extern-crate.stderr
src/test/ui-fulldeps/unnecessary-extern-crate.stderr
+2
-2
src/test/ui/in-band-lifetimes/ellided-lifetimes.rs
src/test/ui/in-band-lifetimes/ellided-lifetimes.rs
+1
-1
src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr
src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr
+2
-2
src/test/ui/inference_unstable.stderr
src/test/ui/inference_unstable.stderr
+1
-1
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
...est/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
+1
-1
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
+1
-1
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
...st/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
+2
-2
src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed
src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed
+1
-1
src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs
src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs
+1
-1
src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr
src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr
+2
-2
src/test/ui/rust-2018/edition-lint-nested-paths.fixed
src/test/ui/rust-2018/edition-lint-nested-paths.fixed
+1
-1
src/test/ui/rust-2018/edition-lint-nested-paths.rs
src/test/ui/rust-2018/edition-lint-nested-paths.rs
+1
-1
src/test/ui/rust-2018/edition-lint-nested-paths.stderr
src/test/ui/rust-2018/edition-lint-nested-paths.stderr
+2
-2
src/test/ui/rust-2018/edition-lint-paths.fixed
src/test/ui/rust-2018/edition-lint-paths.fixed
+1
-1
src/test/ui/rust-2018/edition-lint-paths.rs
src/test/ui/rust-2018/edition-lint-paths.rs
+1
-1
src/test/ui/rust-2018/edition-lint-paths.stderr
src/test/ui/rust-2018/edition-lint-paths.stderr
+2
-2
src/test/ui/rust-2018/extern-crate-idiomatic.fixed
src/test/ui/rust-2018/extern-crate-idiomatic.fixed
+1
-1
src/test/ui/rust-2018/extern-crate-idiomatic.rs
src/test/ui/rust-2018/extern-crate-idiomatic.rs
+1
-1
src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
...t/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
+1
-1
src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs
...test/ui/rust-2018/extern-crate-referenced-by-self-path.rs
+1
-1
src/test/ui/rust-2018/extern-crate-rename.fixed
src/test/ui/rust-2018/extern-crate-rename.fixed
+1
-1
src/test/ui/rust-2018/extern-crate-rename.rs
src/test/ui/rust-2018/extern-crate-rename.rs
+1
-1
src/test/ui/rust-2018/extern-crate-rename.stderr
src/test/ui/rust-2018/extern-crate-rename.stderr
+2
-2
src/test/ui/rust-2018/extern-crate-submod.fixed
src/test/ui/rust-2018/extern-crate-submod.fixed
+1
-1
src/test/ui/rust-2018/extern-crate-submod.rs
src/test/ui/rust-2018/extern-crate-submod.rs
+1
-1
src/test/ui/rust-2018/extern-crate-submod.stderr
src/test/ui/rust-2018/extern-crate-submod.stderr
+2
-2
src/test/ui/single-use-lifetime/fn-types.rs
src/test/ui/single-use-lifetime/fn-types.rs
+1
-1
src/test/ui/single-use-lifetime/fn-types.stderr
src/test/ui/single-use-lifetime/fn-types.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs
.../ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr
...single-use-lifetime/one-use-in-fn-argument-in-band.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-fn-argument.rs
src/test/ui/single-use-lifetime/one-use-in-fn-argument.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr
...test/ui/single-use-lifetime/one-use-in-fn-argument.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-fn-return.rs
src/test/ui/single-use-lifetime/one-use-in-fn-return.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.rs
...ui/single-use-lifetime/one-use-in-inherent-impl-header.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr
...ingle-use-lifetime/one-use-in-inherent-impl-header.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.rs
...ingle-use-lifetime/one-use-in-inherent-method-argument.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr
...e-use-lifetime/one-use-in-inherent-method-argument.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.rs
.../single-use-lifetime/one-use-in-inherent-method-return.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr
...gle-use-lifetime/one-use-in-inherent-method-return.stderr
+2
-2
src/test/ui/single-use-lifetime/one-use-in-struct.rs
src/test/ui/single-use-lifetime/one-use-in-struct.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.rs
...i/single-use-lifetime/one-use-in-trait-method-argument.rs
+1
-1
src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
...ngle-use-lifetime/one-use-in-trait-method-argument.stderr
+2
-2
src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs
...single-use-lifetime/two-uses-in-fn-argument-and-return.rs
+1
-1
src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs
src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs
+1
-1
src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs
...i/single-use-lifetime/two-uses-in-inherent-impl-header.rs
+1
-1
src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.rs
...fetime/two-uses-in-inherent-method-argument-and-return.rs
+1
-1
src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr
...me/two-uses-in-inherent-method-argument-and-return.stderr
+2
-2
src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs
src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs
+1
-1
src/test/ui/single-use-lifetime/zero-uses-in-fn.rs
src/test/ui/single-use-lifetime/zero-uses-in-fn.rs
+1
-1
src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr
src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr
+2
-2
src/test/ui/single-use-lifetime/zero-uses-in-impl.rs
src/test/ui/single-use-lifetime/zero-uses-in-impl.rs
+1
-1
src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr
src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr
+2
-2
src/test/ui/suggestions/removing-extern-crate.stderr
src/test/ui/suggestions/removing-extern-crate.stderr
+1
-1
未找到文件。
src/doc/rustc/src/lints/listing/allowed-by-default.md
浏览文件 @
e60eaf59
...
...
@@ -64,7 +64,7 @@ To fix it, do as the help message suggests:
```
rust
#![feature(dyn_trait)]
#![deny(bare_trait_object)]
#![deny(bare_trait_object
s
)]
trait
Trait
{
}
...
...
src/librustc/hir/lowering.rs
浏览文件 @
e60eaf59
...
...
@@ -4125,7 +4125,7 @@ fn new_implicit_lifetime(&mut self, span: Span) -> hir::Lifetime {
fn
maybe_lint_bare_trait
(
&
self
,
span
:
Span
,
id
:
NodeId
,
is_global
:
bool
)
{
self
.sess
.buffer_lint_with_diagnostic
(
builtin
::
BARE_TRAIT_OBJECT
,
builtin
::
BARE_TRAIT_OBJECT
S
,
id
,
span
,
"trait objects without an explicit `dyn` are deprecated"
,
...
...
src/librustc/lint/builtin.rs
浏览文件 @
e60eaf59
...
...
@@ -225,13 +225,13 @@
}
declare_lint!
{
pub
SINGLE_USE_LIFETIME
,
pub
SINGLE_USE_LIFETIME
S
,
Allow
,
"detects lifetime parameters that are only used once"
}
declare_lint!
{
pub
UNUSED_LIFETIME
,
pub
UNUSED_LIFETIME
S
,
Allow
,
"detects lifetime parameters that are never used"
}
...
...
@@ -243,19 +243,19 @@
}
declare_lint!
{
pub
ELIDED_LIFETIME
_IN_PATH
,
pub
ELIDED_LIFETIME
S_IN_PATHS
,
Allow
,
"hidden lifetime parameters are deprecated, try `Foo<'_>`"
}
declare_lint!
{
pub
BARE_TRAIT_OBJECT
,
pub
BARE_TRAIT_OBJECT
S
,
Allow
,
"suggest using `dyn Trait` for trait objects"
}
declare_lint!
{
pub
ABSOLUTE_PATH_NOT_STARTING_WITH_CRATE
,
pub
ABSOLUTE_PATH
S
_NOT_STARTING_WITH_CRATE
,
Allow
,
"fully qualified paths that start with a module name
\
instead of `crate`, `self`, or an extern crate name"
...
...
@@ -268,7 +268,7 @@
}
declare_lint!
{
pub
UNSTABLE_NAME_COLLISION
,
pub
UNSTABLE_NAME_COLLISION
S
,
Warn
,
"detects name collision with an existing but unstable method"
}
...
...
@@ -328,14 +328,14 @@ fn get_lints(&self) -> LintArray {
DEPRECATED
,
UNUSED_UNSAFE
,
UNUSED_MUT
,
SINGLE_USE_LIFETIME
,
UNUSED_LIFETIME
,
SINGLE_USE_LIFETIME
S
,
UNUSED_LIFETIME
S
,
UNUSED_LABELS
,
TYVAR_BEHIND_RAW_POINTER
,
ELIDED_LIFETIME
_IN_PATH
,
BARE_TRAIT_OBJECT
,
ABSOLUTE_PATH_NOT_STARTING_WITH_CRATE
,
UNSTABLE_NAME_COLLISION
,
ELIDED_LIFETIME
S_IN_PATHS
,
BARE_TRAIT_OBJECT
S
,
ABSOLUTE_PATH
S
_NOT_STARTING_WITH_CRATE
,
UNSTABLE_NAME_COLLISION
S
,
DUPLICATE_ASSOCIATED_TYPE_BINDINGS
,
)
}
...
...
src/librustc/lint/mod.rs
浏览文件 @
e60eaf59
...
...
@@ -505,7 +505,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
"this was previously accepted by the compiler but is being phased out;
\
it will become a hard error"
;
let
explanation
=
if
lint_id
==
LintId
::
of
(::
lint
::
builtin
::
UNSTABLE_NAME_COLLISION
)
{
let
explanation
=
if
lint_id
==
LintId
::
of
(::
lint
::
builtin
::
UNSTABLE_NAME_COLLISION
S
)
{
"once this method is added to the standard library,
\
the ambiguity may cause an error or change in behavior!"
.to_owned
()
...
...
src/librustc/middle/resolve_lifetime.rs
浏览文件 @
e60eaf59
...
...
@@ -1344,7 +1344,7 @@ fn check_uses_for_lifetimes_defined_by_scope(&mut self) {
self
.tcx
.struct_span_lint_node
(
lint
::
builtin
::
SINGLE_USE_LIFETIME
,
lint
::
builtin
::
SINGLE_USE_LIFETIME
S
,
id
,
span
,
&
format!
(
...
...
@@ -1366,7 +1366,7 @@ fn check_uses_for_lifetimes_defined_by_scope(&mut self) {
self
.tcx
.struct_span_lint_node
(
lint
::
builtin
::
UNUSED_LIFETIME
,
lint
::
builtin
::
UNUSED_LIFETIME
S
,
id
,
span
,
&
format!
(
...
...
@@ -1981,7 +1981,7 @@ fn resolve_elided_lifetimes(&mut self, lifetime_refs: &'tcx [hir::Lifetime], dep
if
deprecated
{
self
.tcx
.struct_span_lint_node
(
lint
::
builtin
::
ELIDED_LIFETIME
_IN_PATH
,
lint
::
builtin
::
ELIDED_LIFETIME
S_IN_PATHS
,
id
,
span
,
&
format!
(
"hidden lifetime parameters are deprecated, try `Foo<'_>`"
),
...
...
src/librustc_lint/builtin.rs
浏览文件 @
e60eaf59
...
...
@@ -694,7 +694,7 @@ fn check_attribute(&mut self, cx: &EarlyContext, attr: &ast::Attribute) {
}
declare_lint!
{
pub
UNUSED_DOC_COMMENT
,
pub
UNUSED_DOC_COMMENT
S
,
Warn
,
"detects doc comments that aren't used by rustdoc"
}
...
...
@@ -704,7 +704,7 @@ fn check_attribute(&mut self, cx: &EarlyContext, attr: &ast::Attribute) {
impl
LintPass
for
UnusedDocComment
{
fn
get_lints
(
&
self
)
->
LintArray
{
lint_array!
[
UNUSED_DOC_COMMENT
]
lint_array!
[
UNUSED_DOC_COMMENT
S
]
}
}
...
...
@@ -713,7 +713,7 @@ fn warn_if_doc<'a, 'tcx,
I
:
Iterator
<
Item
=&
'a
ast
::
Attribute
>
,
C
:
LintContext
<
'tcx
>>
(
&
self
,
mut
attrs
:
I
,
cx
:
&
C
)
{
if
let
Some
(
attr
)
=
attrs
.find
(|
a
|
a
.is_value_str
()
&&
a
.check_name
(
"doc"
))
{
cx
.struct_span_lint
(
UNUSED_DOC_COMMENT
,
attr
.span
,
"doc comment not used by rustdoc"
)
cx
.struct_span_lint
(
UNUSED_DOC_COMMENT
S
,
attr
.span
,
"doc comment not used by rustdoc"
)
.emit
();
}
}
...
...
@@ -1527,7 +1527,7 @@ fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
}
declare_lint!
{
pub
UNNECESSARY_EXTERN_CRATE
,
pub
UNNECESSARY_EXTERN_CRATE
S
,
Allow
,
"suggest removing `extern crate` for the 2018 edition"
}
...
...
@@ -1542,7 +1542,7 @@ pub fn new() -> Self {
impl
LintPass
for
ExternCrate
{
fn
get_lints
(
&
self
)
->
LintArray
{
lint_array!
(
UNNECESSARY_EXTERN_CRATE
)
lint_array!
(
UNNECESSARY_EXTERN_CRATE
S
)
}
}
...
...
@@ -1555,7 +1555,7 @@ fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
if
it
.attrs
.iter
()
.any
(|
a
|
a
.check_name
(
"macro_use"
))
{
return
}
let
mut
err
=
cx
.struct_span_lint
(
UNNECESSARY_EXTERN_CRATE
,
let
mut
err
=
cx
.struct_span_lint
(
UNNECESSARY_EXTERN_CRATE
S
,
it
.span
,
"`extern crate` is unnecessary in the new edition"
);
if
it
.vis
==
hir
::
Visibility
::
Public
||
self
.0
>
1
||
orig
.is_some
()
{
let
pub_
=
if
it
.vis
==
hir
::
Visibility
::
Public
{
...
...
src/librustc_lint/lib.rs
浏览文件 @
e60eaf59
...
...
@@ -40,7 +40,7 @@
extern
crate
syntax_pos
;
use
rustc
::
lint
;
use
rustc
::
lint
::
builtin
::{
BARE_TRAIT_OBJECT
,
ABSOLUTE_PATH
_NOT_STARTING_WITH_CRATE
};
use
rustc
::
lint
::
builtin
::{
BARE_TRAIT_OBJECT
S
,
ABSOLUTE_PATHS
_NOT_STARTING_WITH_CRATE
};
use
rustc
::
session
;
use
rustc
::
util
;
...
...
@@ -174,7 +174,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
UNUSED_ATTRIBUTES
,
UNUSED_MACROS
,
UNUSED_ALLOCATION
,
UNUSED_DOC_COMMENT
,
UNUSED_DOC_COMMENT
S
,
UNUSED_EXTERN_CRATES
,
UNUSED_FEATURES
,
UNUSED_LABELS
,
...
...
@@ -182,9 +182,9 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
add_lint_group!
(
sess
,
"rust_2018_idioms"
,
BARE_TRAIT_OBJECT
,
BARE_TRAIT_OBJECT
S
,
UNREACHABLE_PUB
,
UNNECESSARY_EXTERN_CRATE
);
UNNECESSARY_EXTERN_CRATE
S
);
// Guidelines for creating a future incompatibility lint:
//
...
...
@@ -272,14 +272,14 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
edition
:
Some
(
Edition
::
Edition2018
),
},
FutureIncompatibleInfo
{
id
:
LintId
::
of
(
UNSTABLE_NAME_COLLISION
),
id
:
LintId
::
of
(
UNSTABLE_NAME_COLLISION
S
),
reference
:
"issue #48919 <https://github.com/rust-lang/rust/issues/48919>"
,
edition
:
None
,
// Note: this item represents future incompatibility of all unstable functions in the
// standard library, and thus should never be removed or changed to an error.
},
FutureIncompatibleInfo
{
id
:
LintId
::
of
(
ABSOLUTE_PATH_NOT_STARTING_WITH_CRATE
),
id
:
LintId
::
of
(
ABSOLUTE_PATH
S
_NOT_STARTING_WITH_CRATE
),
reference
:
"issue TBD"
,
edition
:
Some
(
Edition
::
Edition2018
),
},
...
...
@@ -291,6 +291,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
]);
// Register renamed and removed lints
store
.register_renamed
(
"single_use_lifetime"
,
"single_use_lifetimes"
);
store
.register_renamed
(
"elided_lifetime_in_path"
,
"elided_lifetimes_in_paths"
);
store
.register_renamed
(
"bare_trait_object"
,
"bare_trait_objects"
);
store
.register_renamed
(
"unstable_name_collision"
,
"unstable_name_collisions"
);
store
.register_renamed
(
"unused_doc_comment"
,
"unused_doc_comments"
);
store
.register_renamed
(
"unknown_features"
,
"unused_features"
);
store
.register_removed
(
"unsigned_negation"
,
"replaced by negate_unsigned feature gate"
);
store
.register_removed
(
"negate_unsigned"
,
"cast a signed value instead"
);
...
...
@@ -325,6 +330,4 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950"
);
store
.register_removed
(
"resolve_trait_on_defaulted_unit"
,
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950"
);
store
.register_removed
(
"absolute_path_starting_with_module"
,
"renamed to `absolute_path_not_starting_with_crate`"
);
}
src/librustc_resolve/lib.rs
浏览文件 @
e60eaf59
...
...
@@ -3486,7 +3486,7 @@ fn lint_path_starts_with_module(&self, id: NodeId, span: Span) {
let
diag
=
lint
::
builtin
::
BuiltinLintDiagnostics
::
AbsPathWithModule
(
span
);
self
.session
.buffer_lint_with_diagnostic
(
lint
::
builtin
::
ABSOLUTE_PATH_NOT_STARTING_WITH_CRATE
,
lint
::
builtin
::
ABSOLUTE_PATH
S
_NOT_STARTING_WITH_CRATE
,
id
,
span
,
"absolute paths must start with `self`, `super`,
\
`crate`, or an external crate name in the 2018 edition"
,
...
...
src/librustc_typeck/check/method/probe.rs
浏览文件 @
e60eaf59
...
...
@@ -1057,7 +1057,7 @@ fn emit_unstable_name_collision_hint(
unstable_candidates
:
&
[(
&
Candidate
<
'tcx
>
,
Symbol
)],
)
{
let
mut
diag
=
self
.tcx
.struct_span_lint_node
(
lint
::
builtin
::
UNSTABLE_NAME_COLLISION
,
lint
::
builtin
::
UNSTABLE_NAME_COLLISION
S
,
self
.fcx.body_id
,
self
.span
,
"a method with this name may be added to the standard library in the future"
,
...
...
src/test/compile-fail/trait-bounds-not-on-struct.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(bare_trait_object)]
#![allow(bare_trait_object
s
)]
struct
Foo
;
...
...
src/test/compile-fail/useless_comment.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(unused_doc_comment)]
#![deny(unused_doc_comment
s
)]
fn
foo
()
{
/// a //~ ERROR doc comment not used by rustdoc
...
...
src/test/ui-fulldeps/unnecessary-extern-crate.rs
浏览文件 @
e60eaf59
...
...
@@ -10,7 +10,7 @@
// compile-flags: --edition 2018
#![deny(unnecessary_extern_crate)]
#![deny(unnecessary_extern_crate
s
)]
#![feature(alloc,
test,
libc)]
extern
crate
alloc
;
...
...
src/test/ui-fulldeps/unnecessary-extern-crate.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | extern crate alloc;
note: lint level defined here
--> $DIR/unnecessary-extern-crate.rs:13:9
|
LL | #![deny(unnecessary_extern_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(unnecessary_extern_crate
s
)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
^
error: `extern crate` is unnecessary in the new edition
--> $DIR/unnecessary-extern-crate.rs:19:1
...
...
src/test/ui/in-band-lifetimes/ellided-lifetimes.rs
浏览文件 @
e60eaf59
...
...
@@ -9,7 +9,7 @@
// except according to those terms.
#![allow(warnings)]
#![allow(unused_variables,
dead_code,
unused,
bad_style)]
#![deny(elided_lifetime
_in_path
)]
#![deny(elided_lifetime
s_in_paths
)]
struct
Foo
<
'a
>
{
x
:
&
'a
u32
}
fn
foo
(
x
:
&
Foo
)
{
...
...
src/test/ui/in-band-lifetimes/ellided-lifetimes.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn foo(x: &Foo) {
note: lint level defined here
--> $DIR/ellided-lifetimes.rs:12:9
|
LL | #![deny(elided_lifetime
_in_path
)]
| ^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(elided_lifetime
s_in_paths
)]
| ^^^^^^^^^^^^^^^^^^^^^^^
^^
error: aborting due to previous error
src/test/ui/inference_unstable.stderr
浏览文件 @
e60eaf59
...
...
@@ -4,7 +4,7 @@ warning: a method with this name may be added to the standard library in the fut
LL | assert_eq!('x'.ipu_flatten(), 1);
| ^^^^^^^^^^^
|
= note: #[warn(unstable_name_collision)] on by default
= note: #[warn(unstable_name_collision
s
)] on by default
= warning: once this method is added to the standard library, the ambiguity may cause an error or change in behavior!
= note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
= help: call with fully qualified syntax `inference_unstable_itertools::IpuItertools::ipu_flatten(...)` to keep using the current method
...
...
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
mod foo {
crate trait Foo {
...
...
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
mod
foo
{
crate
trait
Foo
{
...
...
src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
note: lint level defined here
--> $DIR/edition-lint-fully-qualified-paths.rs:14:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
#![allow(unused_imports)]
#![allow(dead_code)]
...
...
src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
#![allow(unused_imports)]
#![allow(dead_code)]
...
...
src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | use foo::{bar::{baz::{}}};
note: lint level defined here
--> $DIR/edition-lint-nested-empty-paths.rs:14:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/rust-2018/edition-lint-nested-paths.fixed
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
use crate::foo::{a, b};
//~^ ERROR absolute paths must start with
...
...
src/test/ui/rust-2018/edition-lint-nested-paths.rs
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
use
foo
::{
a
,
b
};
//~^ ERROR absolute paths must start with
...
...
src/test/ui/rust-2018/edition-lint-nested-paths.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | use foo::{a, b};
note: lint level defined here
--> $DIR/edition-lint-nested-paths.rs:14:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/rust-2018/edition-lint-paths.fixed
浏览文件 @
e60eaf59
...
...
@@ -12,7 +12,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
#![allow(unused)]
extern crate edition_lint_paths;
...
...
src/test/ui/rust-2018/edition-lint-paths.rs
浏览文件 @
e60eaf59
...
...
@@ -12,7 +12,7 @@
// run-rustfix
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
#![allow(unused)]
extern
crate
edition_lint_paths
;
...
...
src/test/ui/rust-2018/edition-lint-paths.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | use ::bar::Bar;
note: lint level defined here
--> $DIR/edition-lint-paths.rs:15:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/rust-2018/extern-crate-idiomatic.fixed
浏览文件 @
e60eaf59
...
...
@@ -16,7 +16,7 @@
// but we don't.
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern crate edition_lint_paths;
...
...
src/test/ui/rust-2018/extern-crate-idiomatic.rs
浏览文件 @
e60eaf59
...
...
@@ -16,7 +16,7 @@
// but we don't.
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern
crate
edition_lint_paths
;
...
...
src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed
浏览文件 @
e60eaf59
...
...
@@ -17,7 +17,7 @@
// we can't drop the extern crate.
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern crate edition_lint_paths;
use self::edition_lint_paths::foo;
...
...
src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs
浏览文件 @
e60eaf59
...
...
@@ -17,7 +17,7 @@
// we can't drop the extern crate.
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern
crate
edition_lint_paths
;
use
self
::
edition_lint_paths
::
foo
;
...
...
src/test/ui/rust-2018/extern-crate-rename.fixed
浏览文件 @
e60eaf59
...
...
@@ -15,7 +15,7 @@
// paths. We don't (and we leave the `extern crate` in place).
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern crate edition_lint_paths as my_crate;
...
...
src/test/ui/rust-2018/extern-crate-rename.rs
浏览文件 @
e60eaf59
...
...
@@ -15,7 +15,7 @@
// paths. We don't (and we leave the `extern crate` in place).
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
extern
crate
edition_lint_paths
as
my_crate
;
...
...
src/test/ui/rust-2018/extern-crate-rename.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | use my_crate::foo;
note: lint level defined here
--> $DIR/extern-crate-rename.rs:18:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/rust-2018/extern-crate-submod.fixed
浏览文件 @
e60eaf59
...
...
@@ -16,7 +16,7 @@
// place).
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
mod m {
// Because this extern crate does not appear at the root, we
...
...
src/test/ui/rust-2018/extern-crate-submod.rs
浏览文件 @
e60eaf59
...
...
@@ -16,7 +16,7 @@
// place).
#![feature(rust_2018_preview)]
#![deny(absolute_path_not_starting_with_crate)]
#![deny(absolute_path
s
_not_starting_with_crate)]
mod
m
{
// Because this extern crate does not appear at the root, we
...
...
src/test/ui/rust-2018/extern-crate-submod.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | use m::edition_lint_paths::foo;
note: lint level defined here
--> $DIR/extern-crate-submod.rs:19:9
|
LL | #![deny(absolute_path_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | #![deny(absolute_path
s
_not_starting_with_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
src/test/ui/single-use-lifetime/fn-types.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/fn-types.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once
note: lint level defined here
--> $DIR/fn-types.rs:11:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
--> $DIR/fn-types.rs:22:22
...
...
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.rs
浏览文件 @
e60eaf59
...
...
@@ -9,7 +9,7 @@
// except according to those terms.
#![feature(in_band_lifetimes)]
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-fn-argument-in-band.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn a(x: &'a u32, y: &'b u32) {
note: lint level defined here
--> $DIR/one-use-in-fn-argument-in-band.rs:12:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: lifetime parameter `'a` only used once
--> $DIR/one-use-in-fn-argument-in-band.rs:19:10
...
...
src/test/ui/single-use-lifetime/one-use-in-fn-argument.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-fn-argument.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn a<'a>(x: &'a u32) { //~ ERROR `'a` only used once
note: lint level defined here
--> $DIR/one-use-in-fn-argument.rs:11:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/one-use-in-fn-return.rs
浏览文件 @
e60eaf59
...
...
@@ -10,7 +10,7 @@
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-inherent-impl-header.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once
note: lint level defined here
--> $DIR/one-use-in-inherent-impl-header.rs:11:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-inherent-method-argument.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn inherent_a<'a>(&self, data: &'a u32) { //~ ERROR `'a` only used once
note: lint level defined here
--> $DIR/one-use-in-inherent-method-argument.rs:11:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: lifetime parameter `'f` only used once
--> $DIR/one-use-in-inherent-method-argument.rs:21:6
...
...
src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.rs
浏览文件 @
e60eaf59
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-inherent-method-return.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once
note: lint level defined here
--> $DIR/one-use-in-inherent-method-return.rs:11:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/one-use-in-struct.rs
浏览文件 @
e60eaf59
...
...
@@ -14,7 +14,7 @@
//
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.rs
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// Test that we DO warn for a lifetime on an impl used only in `&self`
// in a trait method.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/one-use-in-trait-method-argument.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn next<'g>(&'g mut self) -> Option<Self::Item> { //~ ERROR `'g` only u
note: lint level defined here
--> $DIR/one-use-in-trait-method-argument.rs:14:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs
浏览文件 @
e60eaf59
...
...
@@ -13,7 +13,7 @@
//
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/two-uses-in-fn-arguments.rs
浏览文件 @
e60eaf59
...
...
@@ -13,7 +13,7 @@
//
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs
浏览文件 @
e60eaf59
...
...
@@ -12,7 +12,7 @@
//
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.rs
浏览文件 @
e60eaf59
...
...
@@ -11,7 +11,7 @@
// Test that we DO NOT warn for a lifetime used twice in an impl method and
// header.
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/two-uses-in-inherent-method-argument-and-return.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | impl<'f> Foo<'f> { //~ ERROR `'f` only used once
note: lint level defined here
--> $DIR/two-uses-in-inherent-method-argument-and-return.rs:14:9
|
LL | #![deny(single_use_lifetime)]
| ^^^^^^^^^^^^^^^^^^^
LL | #![deny(single_use_lifetime
s
)]
| ^^^^^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/two-uses-in-trait-impl.rs
浏览文件 @
e60eaf59
...
...
@@ -13,7 +13,7 @@
//
// compile-pass
#![deny(single_use_lifetime)]
#![deny(single_use_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/zero-uses-in-fn.rs
浏览文件 @
e60eaf59
...
...
@@ -10,7 +10,7 @@
// Test that we DO warn when lifetime name is not used at all.
#![deny(unused_lifetime)]
#![deny(unused_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/zero-uses-in-fn.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | fn d<'a>() { } //~ ERROR `'a` never used
note: lint level defined here
--> $DIR/zero-uses-in-fn.rs:13:9
|
LL | #![deny(unused_lifetime)]
| ^^^^^^^^^^^^^^^
LL | #![deny(unused_lifetime
s
)]
| ^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/single-use-lifetime/zero-uses-in-impl.rs
浏览文件 @
e60eaf59
...
...
@@ -10,7 +10,7 @@
// Test that we DO warn when lifetime name is not used at all.
#![deny(unused_lifetime)]
#![deny(unused_lifetime
s
)]
#![allow(dead_code)]
#![allow(unused_variables)]
...
...
src/test/ui/single-use-lifetime/zero-uses-in-impl.stderr
浏览文件 @
e60eaf59
...
...
@@ -7,8 +7,8 @@ LL | impl<'a> Foo { } //~ ERROR `'a` never used
note: lint level defined here
--> $DIR/zero-uses-in-impl.rs:13:9
|
LL | #![deny(unused_lifetime)]
| ^^^^^^^^^^^^^^^
LL | #![deny(unused_lifetime
s
)]
| ^^^^^^^^^^^^^^^
^
error: aborting due to previous error
src/test/ui/suggestions/removing-extern-crate.stderr
浏览文件 @
e60eaf59
...
...
@@ -9,7 +9,7 @@ note: lint level defined here
|
LL | #![warn(rust_2018_idioms)]
| ^^^^^^^^^^^^^^^^
= note: #[warn(unnecessary_extern_crate)] implied by #[warn(rust_2018_idioms)]
= note: #[warn(unnecessary_extern_crate
s
)] implied by #[warn(rust_2018_idioms)]
warning: `extern crate` is unnecessary in the new edition
--> $DIR/removing-extern-crate.rs:20:1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录