Skip to content

Commit 4b4ce95

Browse files
committed
Avoid some warnings in production runs.
1 parent 8617604 commit 4b4ce95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bin/cargo_semver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ fn do_main(config: &Config, matches: &Matches) -> CargoResult<()> {
209209
.map_err(|e| format!("could not spawn rustc: {}", e))?;
210210

211211
if let Some(ref mut stdin) = child.stdin {
212-
stdin.write_fmt(format_args!("extern crate new; extern crate old;"))?;
212+
stdin.write_fmt(format_args!("#[allow(unused_extern_crate)] \
213+
extern crate new; \
214+
#[allow(unused_extern_crate)] \
215+
extern crate old;"))?;
213216
} else {
214217
return Err("could not pipe to rustc (wtf?)".into());
215218
}

0 commit comments

Comments
 (0)