@@ -107,7 +107,7 @@ fn rewrite_intra_doc_link(
107107 let krate = resolved. module ( db) ?. krate ( ) ;
108108 let canonical_path = resolved. canonical_path ( db) ?;
109109 let new_target = get_doc_url ( db, & krate) ?
110- . join ( & format ! ( "{}/" , krate. display_name ( db) ?) )
110+ . join ( & format ! ( "{}/" , krate. declaration_name ( db) ?) )
111111 . ok ( ) ?
112112 . join ( & canonical_path. replace ( "::" , "/" ) )
113113 . ok ( ) ?
@@ -127,7 +127,7 @@ fn rewrite_url_link(db: &RootDatabase, def: ModuleDef, target: &str) -> Option<S
127127 let module = def. module ( db) ?;
128128 let krate = module. krate ( ) ;
129129 let canonical_path = def. canonical_path ( db) ?;
130- let base = format ! ( "{}/{}" , krate. display_name ( db) ?, canonical_path. replace( "::" , "/" ) ) ;
130+ let base = format ! ( "{}/{}" , krate. declaration_name ( db) ?, canonical_path. replace( "::" , "/" ) ) ;
131131
132132 get_doc_url ( db, & krate)
133133 . and_then ( |url| url. join ( & base) . ok ( ) )
@@ -248,7 +248,7 @@ fn get_doc_url(db: &RootDatabase, krate: &Crate) -> Option<Url> {
248248 //
249249 // FIXME: clicking on the link should just open the file in the editor,
250250 // instead of falling back to external urls.
251- Some ( format ! ( "https://docs.rs/{}/*/" , krate. display_name ( db) ?) )
251+ Some ( format ! ( "https://docs.rs/{}/*/" , krate. declaration_name ( db) ?) )
252252 } )
253253 . and_then ( |s| Url :: parse ( & s) . ok ( ) )
254254}
0 commit comments