mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rebase fallout.
This commit is contained in:
parent
11e2966f3f
commit
ce1da849b0
@ -182,7 +182,7 @@ fn parse_iter_usage(
|
|||||||
},
|
},
|
||||||
_,
|
_,
|
||||||
) => {
|
) => {
|
||||||
let parent_span = e.span.parent().unwrap();
|
let parent_span = e.span.parent_callsite().unwrap();
|
||||||
if parent_span.ctxt() == ctxt {
|
if parent_span.ctxt() == ctxt {
|
||||||
(Some(UnwrapKind::QuestionMark), parent_span)
|
(Some(UnwrapKind::QuestionMark), parent_span)
|
||||||
} else {
|
} else {
|
||||||
|
@ -120,7 +120,7 @@ impl EarlyLintPass for ModStyle {
|
|||||||
correct.push("mod.rs");
|
correct.push("mod.rs");
|
||||||
cx.struct_span_lint(
|
cx.struct_span_lint(
|
||||||
SELF_NAMED_MODULE_FILES,
|
SELF_NAMED_MODULE_FILES,
|
||||||
Span::new(file.start_pos, file.start_pos, SyntaxContext::root()),
|
Span::new(file.start_pos, file.start_pos, SyntaxContext::root(), None),
|
||||||
|build| {
|
|build| {
|
||||||
let mut lint =
|
let mut lint =
|
||||||
build.build(&format!("`mod.rs` files are required, found `{}`", path.display()));
|
build.build(&format!("`mod.rs` files are required, found `{}`", path.display()));
|
||||||
@ -167,7 +167,7 @@ fn check_self_named_mod_exists(cx: &EarlyContext<'_>, path: &Path, file: &Source
|
|||||||
|
|
||||||
cx.struct_span_lint(
|
cx.struct_span_lint(
|
||||||
MOD_MODULE_FILES,
|
MOD_MODULE_FILES,
|
||||||
Span::new(file.start_pos, file.start_pos, SyntaxContext::root()),
|
Span::new(file.start_pos, file.start_pos, SyntaxContext::root(), None),
|
||||||
|build| {
|
|build| {
|
||||||
let mut lint = build.build(&format!("`mod.rs` files are not allowed, found `{}`", path.display()));
|
let mut lint = build.build(&format!("`mod.rs` files are not allowed, found `{}`", path.display()));
|
||||||
lint.help(&format!("move `{}` to `{}`", path.display(), mod_file.display(),));
|
lint.help(&format!("move `{}` to `{}`", path.display(), mod_file.display(),));
|
||||||
|
Loading…
Reference in New Issue
Block a user