about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/errors.rs
diff options
context:
space:
mode:
authorsurechen <chenshuo17@huawei.com>2024-04-08 16:19:09 +0800
committersurechen <chenshuo17@huawei.com>2024-05-22 19:47:32 +0800
commit8fde7e3b64109f5ebfadef4a015e2cb055bed08c (patch)
tree61a65d980f3949d310fed982b7dbfcbcf8f8a973 /compiler/rustc_passes/src/errors.rs
parent60faa271d9f11474caa68de6fe44ff502437f9e1 (diff)
downloadrust-8fde7e3b64109f5ebfadef4a015e2cb055bed08c.tar.gz
rust-8fde7e3b64109f5ebfadef4a015e2cb055bed08c.zip
For OutsideLoop we should not suggest add 'block label in if block, or we wiil get another err: block label not supported here.
fixes #123261
Diffstat (limited to 'compiler/rustc_passes/src/errors.rs')
-rw-r--r--compiler/rustc_passes/src/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs
index b8586e7e974..a5518717093 100644
--- a/compiler/rustc_passes/src/errors.rs
+++ b/compiler/rustc_passes/src/errors.rs
@@ -1103,7 +1103,7 @@ pub struct BreakInsideCoroutine<'a> {
 pub struct OutsideLoop<'a> {
     #[primary_span]
     #[label]
-    pub span: Span,
+    pub spans: Vec<Span>,
     pub name: &'a str,
     pub is_break: bool,
     #[subdiagnostic]
@@ -1115,7 +1115,7 @@ pub struct OutsideLoopSuggestion {
     #[suggestion_part(code = "'block: ")]
     pub block_span: Span,
     #[suggestion_part(code = " 'block")]
-    pub break_span: Span,
+    pub break_spans: Vec<Span>,
 }
 
 #[derive(Diagnostic)]