use array explicitly instead of vec for const content (even if optimizer smart enought to remove allocation)
This commit is contained in:
parent
aad48f71b3
commit
f3fb821f3b
@ -883,8 +883,8 @@ fn compute_2229_migrations_for_trait(
|
||||
self.tcx.get_diagnostic_item(sym::unwind_safe_trait),
|
||||
self.tcx.get_diagnostic_item(sym::ref_unwind_safe_trait),
|
||||
];
|
||||
let auto_traits =
|
||||
vec!["`Clone`", "`Sync`", "`Send`", "`Unpin`", "`UnwindSafe`", "`RefUnwindSafe`"];
|
||||
const AUTO_TRAITS: [&str; 6] =
|
||||
["`Clone`", "`Sync`", "`Send`", "`Unpin`", "`UnwindSafe`", "`RefUnwindSafe`"];
|
||||
|
||||
let root_var_min_capture_list = min_captures.and_then(|m| m.get(&var_hir_id))?;
|
||||
|
||||
@ -957,7 +957,7 @@ fn compute_2229_migrations_for_trait(
|
||||
// by the root variable but not by the capture
|
||||
for (idx, _) in obligations_should_hold.iter().enumerate() {
|
||||
if !obligations_holds_for_capture[idx] && obligations_should_hold[idx] {
|
||||
capture_problems.insert(auto_traits[idx]);
|
||||
capture_problems.insert(AUTO_TRAITS[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user