Skip to content

Commit

Permalink
force availability of nightly features in cargo
Browse files Browse the repository at this point in the history
since we're technically using a "dev" version of cargo, nightly features
won't be available unless we force them on
  • Loading branch information
QuietMisdreavus committed Oct 16, 2018
1 parent 8f4691f commit 3c06148
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/build_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::{Path, PathBuf};
use std::env;
use std::sync::Arc;

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

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

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

0 comments on commit 3c06148

Please sign in to comment.