Replace `old_prefix` in a Name with `new_prefix`. Example: `name_replace_prefix("A.B.mk", "A.B", "X.Y")` → `"X.Y.mk"`
( name: &Name, old_prefix: &Name, new_prefix: &Name, )
| 1405 | /// diamond-shaped types (a `TensorProduct` with shared param subterms |
| 1406 | /// fans out). With memoization each unique subterm is visited once. |
| 1407 | fn has_out_of_scc_const( |
| 1408 | expr: &LeanExpr, |
| 1409 | in_scc_names: &std::collections::HashMap<Name, Name>, |
| 1410 | original_names: &std::collections::HashSet<Name>, |
| 1411 | cache: &mut FxHashMap<Hash, bool>, |
| 1412 | ) -> bool { |
| 1413 | let key = *expr.get_hash(); |
| 1414 | if let Some(&cached) = cache.get(&key) { |
| 1415 | return cached; |
| 1416 | } |
| 1417 | let result = match expr.as_data() { |
| 1418 | ExprData::Const(name, _, _) => { |
| 1419 | original_names.contains(name) && !in_scc_names.contains_key(name) |
no test coverage detected