Skip to content

Commit 3c06148

Browse files
force availability of nightly features in cargo
since we're technically using a "dev" version of cargo, nightly features won't be available unless we force them on
1 parent 8f4691f commit 3c06148

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/build_doc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::{Path, PathBuf};
77
use std::env;
88
use std::sync::Arc;
99

10-
use cargo::core::{SourceId, Dependency, Source, Package, Workspace};
10+
use cargo::core::{self, SourceId, Dependency, Source, Package, Workspace};
1111
use cargo::core::compiler::{DefaultExecutor, CompileMode, MessageFormat, BuildConfig, Executor};
1212
use cargo::core::package::PackageSet;
1313
use cargo::core::source::SourceMap;
@@ -30,6 +30,7 @@ use Metadata;
3030
// and build a crate and its documentation
3131
// instead of doing it manually like in the previous version of cratesfyi
3232
pub fn build_doc(name: &str, vers: Option<&str>, target: Option<&str>) -> Result<Package> {
33+
core::enable_nightly_features();
3334
let config = try!(Config::default());
3435
let source_id = try!(SourceId::crates_io(&config));
3536

@@ -117,6 +118,7 @@ pub fn build_doc(name: &str, vers: Option<&str>, target: Option<&str>) -> Result
117118

118119
/// Downloads a crate and returns Cargo Package.
119120
pub fn get_package(name: &str, vers: Option<&str>) -> CargoResult<Package> {
121+
core::enable_nightly_features();
120122
debug!("Getting package with cargo");
121123
let config = try!(Config::default());
122124
let source_id = try!(SourceId::crates_io(&config));

0 commit comments

Comments
 (0)