Skip to content

Commit ee96a7a

Browse files
committed
move comment about local trait
1 parent af6b84a commit ee96a7a

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_infer/src/traits/error_reporting

1 file changed

+2
-1
lines changed

compiler/rustc_infer/src/traits/error_reporting/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@ pub fn report_object_safety_error<'tcx>(
101101
to be resolvable dynamically; for more information visit \
102102
<https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
103103
);
104+
105+
// Only provide the help if its a local trait, otherwise it's not actionable.
104106
if trait_span.is_some() {
105107
let mut reported_violations: Vec<_> = reported_violations.into_iter().collect();
106108
reported_violations.sort();
107109

108-
// Only provide the help if its a local trait, otherwise it's not actionable.
109110
let mut potential_solutions: Vec<_> =
110111
reported_violations.into_iter().map(|violation| violation.solution()).collect();
111112
potential_solutions.sort();

0 commit comments

Comments
 (0)