| 
1 | 1 | use crate::context::Context;  | 
2 | 2 | use crate::rust_to_vir_base::{  | 
3 |  | -    def_id_to_vir_path, mid_ty_const_to_vir, mid_ty_to_vir, mk_visibility, remove_host_arg,  | 
4 |  | -    typ_path_and_ident_to_vir_path,  | 
 | 3 | +    def_id_to_vir_path, def_id_to_vir_path_option, mid_ty_const_to_vir, mid_ty_to_vir,  | 
 | 4 | +    mk_visibility, remove_host_arg, typ_path_and_ident_to_vir_path,  | 
5 | 5 | };  | 
6 | 6 | use crate::rust_to_vir_func::{check_item_fn, CheckItemFnEither};  | 
7 | 7 | use crate::util::err_span;  | 
@@ -472,9 +472,11 @@ pub(crate) fn collect_external_trait_impls<'tcx>(  | 
472 | 472 |     for c in tcx.crates(()) {  | 
473 | 473 |         assert!(*c != rustc_span::def_id::LOCAL_CRATE);  | 
474 | 474 |         for trait_id in tcx.traits(*c) {  | 
475 |  | -            let path = def_id_to_vir_path(tcx, &ctxt.verus_items, *trait_id);  | 
476 |  | -            if all_traits.contains(&path) {  | 
477 |  | -                all_trait_ids.push(*trait_id);  | 
 | 475 | +            let path = def_id_to_vir_path_option(tcx, Some(&ctxt.verus_items), *trait_id);  | 
 | 476 | +            if let Some(path) = path {  | 
 | 477 | +                if all_traits.contains(&path) {  | 
 | 478 | +                    all_trait_ids.push(*trait_id);  | 
 | 479 | +                }  | 
478 | 480 |             }  | 
479 | 481 |         }  | 
480 | 482 |     }  | 
 | 
0 commit comments