Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit fd1df15

Browse files
committed
Update Cargo
1 parent 27064e8 commit fd1df15

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

Cargo.lock

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ rls-vfs = "0.8"
3030
rls-ipc = { version = "0.1.0", path = "rls-ipc", optional = true }
3131

3232
anyhow = "1.0.26"
33-
cargo = { git = "https://github.com/rust-lang/cargo", rev = "34170fcd6e0947808a1ac63ac85ffc0da7dace2f" }
33+
cargo = { git = "https://github.com/rust-lang/cargo", rev = "970bc67c3775781b9708c8a36893576b9459c64a" }
3434
cargo_metadata = "0.8"
3535
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "7ea7cd165ad6705603852771bf82cc2fd6560db5", optional = true }
3636
env_logger = "0.7"

rls/src/build/cargo.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ use std::thread;
1212
use cargo::core::compiler::{BuildConfig, CompileMode, Context, Executor, Unit};
1313
use cargo::core::resolver::ResolveError;
1414
use cargo::core::Package;
15-
use cargo::core::{
16-
enable_nightly_features, PackageId, Shell, Target, TargetKind, Verbosity, Workspace,
17-
};
15+
use cargo::core::{PackageId, Shell, Target, TargetKind, Verbosity, Workspace};
1816
use cargo::ops::{compile_with_exec, CompileFilter, CompileOptions, Packages};
1917
use cargo::util::{
2018
config as cargo_config, errors::ManifestError, homedir, important_paths, CargoResult,
@@ -123,14 +121,14 @@ fn run_cargo(
123121
let mut shell = Shell::from_write(Box::new(BufWriter(Arc::clone(&out))));
124122
shell.set_verbosity(Verbosity::Quiet);
125123

126-
let config = {
124+
let mut config = {
127125
let rls_config = rls_config.lock().unwrap();
128126

129127
let target_dir = rls_config.target_dir.as_ref().as_ref().map(|p| p as &Path);
130128
make_cargo_config(manifest_dir, target_dir, restore_env.get_old_cwd(), shell)
131129
};
130+
config.nightly_features_allowed = true;
132131

133-
enable_nightly_features();
134132
let ws = Workspace::new(&manifest_path, &config)
135133
.map_err(|err| ManifestAwareError::new(err, &manifest_path, None))?;
136134

rls/src/project_model.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl ProjectModel {
4545
assert!(ws_manifest.ends_with("Cargo.toml"));
4646
let mut config = Config::default()?;
4747
// Enable nightly flag for cargo(see #1043)
48-
cargo::core::enable_nightly_features();
48+
config.nightly_features_allowed = true;
4949
// frozen = false, locked = false, offline = false
5050
config.configure(0, true, None, false, false, false, &None, &[], &[])?;
5151
let ws = Workspace::new(&ws_manifest, &config)?;

0 commit comments

Comments
 (0)