about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authornxya <nathacutlan@gmail.com>2023-07-18 21:53:34 -0400
committernxya <nathacutlan@gmail.com>2023-07-18 21:53:34 -0400
commita54a66830db71252f56ac851b9d03e4d8a9d75f4 (patch)
tree61cf91a142f329f30dc6f04d66a8e965d3c0e6c5 /compiler/rustc_query_system
parente6e88920514d2428130fe1d95ae30ae538ac8644 (diff)
downloadrust-a54a66830db71252f56ac851b9d03e4d8a9d75f4.tar.gz
rust-a54a66830db71252f56ac851b9d03e4d8a9d75f4.zip
moved note as unspanned note, moved note to the bottom of the msg
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/error.rs3
-rw-r--r--compiler/rustc_query_system/src/query/job.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_query_system/src/error.rs b/compiler/rustc_query_system/src/error.rs
index 8ed559f2b72..e49e78cc7c4 100644
--- a/compiler/rustc_query_system/src/error.rs
+++ b/compiler/rustc_query_system/src/error.rs
@@ -46,7 +46,6 @@ pub struct CycleUsage {
 #[derive(Diagnostic)]
 #[diag(query_system_cycle, code = "E0391")]
 pub struct Cycle {
-    #[note]
     #[primary_span]
     pub span: Span,
     pub stack_bottom: String,
@@ -58,6 +57,8 @@ pub struct Cycle {
     pub alias: Option<Alias>,
     #[subdiagnostic]
     pub cycle_usage: Option<CycleUsage>,
+    #[note]
+    pub note_span: (),
 }
 
 #[derive(Diagnostic)]
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs
index f45f7ca5da6..1e301ea2619 100644
--- a/compiler/rustc_query_system/src/query/job.rs
+++ b/compiler/rustc_query_system/src/query/job.rs
@@ -607,6 +607,7 @@ pub(crate) fn report_cycle<'a, D: DepKind>(
         alias,
         cycle_usage: cycle_usage,
         stack_count,
+        note_span: (),
     };
 
     cycle_diag.into_diagnostic(&sess.parse_sess.span_diagnostic)