File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,7 @@ pub struct Crate {
7373
7474impl Clean < Crate > for visit_ast:: RustdocVisitor {
7575 fn clean ( & self ) -> Crate {
76- use syntax:: attr:: { find_linkage_metas, last_meta_item_value_str_by_name} ;
77- let maybe_meta = last_meta_item_value_str_by_name (
78- find_linkage_metas ( self . attrs ) , "name" ) ;
76+ use syntax:: attr:: find_pkgid;
7977 let cx = local_data:: get ( super :: ctxtkey, |x| * x. unwrap ( ) ) ;
8078
8179 let mut externs = HashMap :: new ( ) ;
@@ -84,10 +82,9 @@ impl Clean<Crate> for visit_ast::RustdocVisitor {
8482 } ) ;
8583
8684 Crate {
87- name : match maybe_meta {
88- Some ( x) => x. to_owned ( ) ,
89- None => fail ! ( "rustdoc requires a \\ #[link(name=\" foo\" )] \
90- crate attribute") ,
85+ name : match find_pkgid ( self . attrs ) {
86+ Some ( n) => n,
87+ None => fail ! ( "rustdoc requires a `pkgid` crate attribute" ) ,
9188 } ,
9289 module : Some ( self . module . clean ( ) ) ,
9390 externs : externs,
You can’t perform that action at this time.
0 commit comments