Skip to content

Commit b20aa5b

Browse files
committed
librustpkg: don't clobber the crate attributes for the pkgid
1 parent cecc13a commit b20aa5b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustdoc/clean.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Clean<Crate> for visit_ast::RustdocVisitor {
8383

8484
Crate {
8585
name: match find_pkgid(self.attrs) {
86-
Some(n) => n,
86+
Some(n) => n.name,
8787
None => fail!("rustdoc requires a `pkgid` crate attribute"),
8888
},
8989
module: Some(self.module.clean()),

src/librustpkg/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub fn compile_input(context: &BuildContext,
300300
pkg_id.version.to_str()).to_managed());
301301

302302
debug!("pkgid attr: {:?}", pkgid_attr);
303-
crate.attrs = ~[attr::mk_attr(pkgid_attr)];
303+
crate.attrs.push(attr::mk_attr(pkgid_attr));
304304
}
305305

306306
debug!("calling compile_crate_from_input, workspace = {},

0 commit comments

Comments
 (0)