about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Mehri <ryan.mehri1@gmail.com>2023-11-26 10:09:25 -0800
committerRyan Mehri <ryan.mehri1@gmail.com>2023-11-26 10:09:25 -0800
commitee96a7a28846aa269689c74dba210535f43e4588 (patch)
tree622af593759bd5e7f08eb6ae202931afec0dd61c
parentaf6b84aaab06aec34dff70284281b14e3f547008 (diff)
downloadrust-ee96a7a28846aa269689c74dba210535f43e4588.tar.gz
rust-ee96a7a28846aa269689c74dba210535f43e4588.zip
move comment about local trait
-rw-r--r--compiler/rustc_infer/src/traits/error_reporting/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/traits/error_reporting/mod.rs b/compiler/rustc_infer/src/traits/error_reporting/mod.rs
index 59aee542f96..b3cfd843ace 100644
--- a/compiler/rustc_infer/src/traits/error_reporting/mod.rs
+++ b/compiler/rustc_infer/src/traits/error_reporting/mod.rs
@@ -101,11 +101,12 @@ pub fn report_object_safety_error<'tcx>(
          to be resolvable dynamically; for more information visit \
          <https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
     );
+
+    // Only provide the help if its a local trait, otherwise it's not actionable.
     if trait_span.is_some() {
         let mut reported_violations: Vec<_> = reported_violations.into_iter().collect();
         reported_violations.sort();
 
-        // Only provide the help if its a local trait, otherwise it's not actionable.
         let mut potential_solutions: Vec<_> =
             reported_violations.into_iter().map(|violation| violation.solution()).collect();
         potential_solutions.sort();