Skip to content

Commit 7d03b39

Browse files
committed
in which elided-lifetimes-in-paths receives a promotion to Idioms 2018
We also conscientiously note where current work has fallen short. This is for rust-lang#52041.
1 parent 734db3e commit 7d03b39

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/librustc/middle/resolve_lifetime.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
21292129
replace_span,
21302130
"indicate the anonymous lifetime",
21312131
suggestion.to_owned(),
2132-
Applicability::MachineApplicable
2132+
// false positives observed with macros, `Ref::map` (tracking issue #52041)
2133+
Applicability::MaybeIncorrect
21332134
);
21342135
}
21352136
err.emit();

src/librustc_lint/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ extern crate syntax_pos;
4444

4545
use rustc::lint;
4646
use rustc::lint::{LateContext, LateLintPass, LintPass, LintArray};
47-
use rustc::lint::builtin::{BARE_TRAIT_OBJECTS, ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE};
48-
use rustc::lint::builtin::MACRO_USE_EXTERN_CRATE;
47+
use rustc::lint::builtin::{BARE_TRAIT_OBJECTS, ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE,
48+
ELIDED_LIFETIMES_IN_PATHS, MACRO_USE_EXTERN_CRATE};
49+
4950
use rustc::session;
5051
use rustc::util;
5152
use rustc::hir;
@@ -183,6 +184,7 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
183184
UNREACHABLE_PUB,
184185
UNUSED_EXTERN_CRATES,
185186
MACRO_USE_EXTERN_CRATE,
187+
ELIDED_LIFETIMES_IN_PATHS,
186188
ELLIPSIS_INCLUSIVE_RANGE_PATTERNS);
187189

188190
// Guidelines for creating a future incompatibility lint:

0 commit comments

Comments
 (0)