summary refs log tree commit diff
path: root/pkgs/development/tools/rust
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-03-16 00:39:08 +0000
committerGitHub <noreply@github.com>2021-03-16 00:39:08 +0000
commitd18aaddde4eaf3970d72e6981e1158474e9ca47e (patch)
tree19117f8d86639f4ee30495a0a55626f7df651fa6 /pkgs/development/tools/rust
parent4915d2cb4cf2ee22446bf16f566f43d78cf29584 (diff)
parentfee2e23c00fbeb2e3fe3db310e7dd56ae2ce734d (diff)
downloadnixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar.gz
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar.bz2
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar.lz
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar.xz
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.tar.zst
nixpkgs-d18aaddde4eaf3970d72e6981e1158474e9ca47e.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/tools/rust')
-rw-r--r--pkgs/development/tools/rust/cargo-udeps/default.nix6
-rw-r--r--pkgs/development/tools/rust/rust-analyzer/default.nix6
-rw-r--r--pkgs/development/tools/rust/rust-analyzer/generic.nix2
-rw-r--r--pkgs/development/tools/rust/rust-analyzer/rust_1_49.patch13
4 files changed, 21 insertions, 6 deletions
diff --git a/pkgs/development/tools/rust/cargo-udeps/default.nix b/pkgs/development/tools/rust/cargo-udeps/default.nix
index 5e1cdc5e21b..d89bad18e32 100644
--- a/pkgs/development/tools/rust/cargo-udeps/default.nix
+++ b/pkgs/development/tools/rust/cargo-udeps/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-udeps";
-  version = "0.1.18";
+  version = "0.1.19";
 
   src = fetchFromGitHub {
     owner = "est31";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-o02MQC0/sc/+qbIXJVN84a2SKxSJaUSXXtBs0h+lQes=";
+    sha256 = "sha256-0XE1w/FZmy0iMm5LI885S7F6GxgeHwh57t8N4hreSKw=";
   };
 
-  cargoSha256 = "sha256-tlAA2Aw5OQ9/FCyTckS559s6Zp4Nx8m34yLT9q5F3nI=";
+  cargoSha256 = "sha256-7pfGMCChOMSLlZ/bvaHfpksru5bCHfBQUN+sGyI1M8E=";
 
   nativeBuildInputs = [ pkg-config ];
 
diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix
index e9a5150befa..642f2e936e1 100644
--- a/pkgs/development/tools/rust/rust-analyzer/default.nix
+++ b/pkgs/development/tools/rust/rust-analyzer/default.nix
@@ -2,10 +2,10 @@
 
 {
   rust-analyzer-unwrapped = callPackage ./generic.nix rec {
-    rev = "2021-03-01";
+    rev = "2021-03-15";
     version = "unstable-${rev}";
-    sha256 = "10x4fk1nxk548cfxrbfvz0kpa2r955d0bcnxxn8k8zmrdqxs3sph";
-    cargoSha256 = "02s6qnq61vifx59hnbaalqmfvp8anfik62y6rzy3rwm1l9r85qrz";
+    sha256 = "150gydm0mg72bbhgjjks8qc5ldiqyzhai9z4yfh4f1s2bwdfh3yf";
+    cargoSha256 = "10l0lk5p11002q59dqa5yrrz6n6s11i7bmr1wnl141bxqvm873q2";
   };
 
   rust-analyzer = callPackage ./wrapper.nix {} {
diff --git a/pkgs/development/tools/rust/rust-analyzer/generic.nix b/pkgs/development/tools/rust/rust-analyzer/generic.nix
index 0ce33f0f233..ecca83f89a4 100644
--- a/pkgs/development/tools/rust/rust-analyzer/generic.nix
+++ b/pkgs/development/tools/rust/rust-analyzer/generic.nix
@@ -43,6 +43,8 @@ rustPlatform.buildRustPackage {
 
   passthru.updateScript = ./update.sh;
 
+  patches = [ ./rust_1_49.patch ];
+
   meta = with lib; {
     description = "An experimental modular compiler frontend for the Rust language";
     homepage = "https://github.com/rust-analyzer/rust-analyzer";
diff --git a/pkgs/development/tools/rust/rust-analyzer/rust_1_49.patch b/pkgs/development/tools/rust/rust-analyzer/rust_1_49.patch
new file mode 100644
index 00000000000..fcde6d6337e
--- /dev/null
+++ b/pkgs/development/tools/rust/rust-analyzer/rust_1_49.patch
@@ -0,0 +1,13 @@
+diff --git a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
+index 4e75a7b14..91f51a1a7 100644
+--- a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
++++ b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
+@@ -93,7 +93,7 @@ fn validate_method_call_expr(
+     let krate = module.krate();
+ 
+     let iter_trait = FamousDefs(sema, Some(krate)).core_iter_Iterator()?;
+-    it_type.impls_trait(sema.db, iter_trait, &[]).then(|| (expr, receiver))
++    if it_type.impls_trait(sema.db, iter_trait, &[]) { Some((expr, receiver)) } else { None }
+ }
+ 
+ #[cfg(test)]