We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af6b84a commit ee96a7aCopy full SHA for ee96a7a
compiler/rustc_infer/src/traits/error_reporting/mod.rs
@@ -101,11 +101,12 @@ pub fn report_object_safety_error<'tcx>(
101
to be resolvable dynamically; for more information visit \
102
<https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
103
);
104
+
105
+ // Only provide the help if its a local trait, otherwise it's not actionable.
106
if trait_span.is_some() {
107
let mut reported_violations: Vec<_> = reported_violations.into_iter().collect();
108
reported_violations.sort();
109
- // Only provide the help if its a local trait, otherwise it's not actionable.
110
let mut potential_solutions: Vec<_> =
111
reported_violations.into_iter().map(|violation| violation.solution()).collect();
112
potential_solutions.sort();
0 commit comments