Rebase fallout.
This commit is contained in:
parent
11a999e634
commit
7842b80478
5 changed files with 6 additions and 5 deletions
|
@ -423,6 +423,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
let if_expr = self.expr(span, if_kind, ThinVec::new());
|
let if_expr = self.expr(span, if_kind, ThinVec::new());
|
||||||
let block = self.block_expr(self.arena.alloc(if_expr));
|
let block = self.block_expr(self.arena.alloc(if_expr));
|
||||||
let span = self.lower_span(span.with_hi(cond.span.hi()));
|
let span = self.lower_span(span.with_hi(cond.span.hi()));
|
||||||
|
let opt_label = self.lower_label(opt_label);
|
||||||
hir::ExprKind::Loop(block, opt_label, hir::LoopSource::While, span)
|
hir::ExprKind::Loop(block, opt_label, hir::LoopSource::While, span)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
|
||||||
#[cfg(not(any(cfail1,cfail4)))]
|
#[cfg(not(any(cfail1,cfail4)))]
|
||||||
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,typeck")]
|
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,typeck")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,typeck")]
|
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,typeck,optimized_mir")]
|
||||||
#[rustc_clean(cfg="cfail6")]
|
#[rustc_clean(cfg="cfail6")]
|
||||||
pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
|
pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
|
||||||
let mut ret = 1;
|
let mut ret = 1;
|
||||||
|
|
|
@ -214,7 +214,7 @@ pub fn change_continue_label() {
|
||||||
#[cfg(not(any(cfail1,cfail4)))]
|
#[cfg(not(any(cfail1,cfail4)))]
|
||||||
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,typeck")]
|
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,typeck")]
|
||||||
#[rustc_clean(cfg="cfail3")]
|
#[rustc_clean(cfg="cfail3")]
|
||||||
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,typeck")]
|
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,typeck,optimized_mir")]
|
||||||
#[rustc_clean(cfg="cfail6")]
|
#[rustc_clean(cfg="cfail6")]
|
||||||
pub fn change_continue_label() {
|
pub fn change_continue_label() {
|
||||||
let mut _x = 0;
|
let mut _x = 0;
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue