Skip to content

Commit c1970f9

Browse files
committed
---
yaml --- r: 153740 b: refs/heads/try2 c: 237738f h: refs/heads/master v: v3
1 parent 96cda49 commit c1970f9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 103d888f659f642d251e47eed4ded2e1e4ce03d1
8+
refs/heads/try2: 237738fa3ea266fb33f5a0c774347bf73bb20825
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustdoc/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pub fn opts() -> Vec<getopts::OptGroup> {
102102
optopt("w", "output-format", "the output type to write",
103103
"[html|json]"),
104104
optopt("o", "output", "where to place the output", "PATH"),
105+
optopt("", "crate-name", "specify the name of this crate", "NAME"),
105106
optmulti("L", "library-path", "directory to add to crate search path",
106107
"DIR"),
107108
optmulti("", "cfg", "pass a --cfg to rustc", ""),
@@ -323,7 +324,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
323324

324325
let cr = Path::new(cratefile);
325326
info!("starting to run rustc");
326-
let (krate, analysis) = std::task::try(proc() {
327+
let (mut krate, analysis) = std::task::try(proc() {
327328
let cr = cr;
328329
core::run_core(libs.move_iter().collect(),
329330
cfgs,
@@ -333,6 +334,11 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
333334
info!("finished with rustc");
334335
analysiskey.replace(Some(analysis));
335336

337+
match matches.opt_str("crate-name") {
338+
Some(name) => krate.name = name,
339+
None => {}
340+
}
341+
336342
// Process all of the crate attributes, extracting plugin metadata along
337343
// with the passes which we are supposed to run.
338344
match krate.module.get_ref().doc_list() {

0 commit comments

Comments
 (0)