diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index d08f2acb9dec..164e57e77490 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -11,23 +11,20 @@ rustPlatform.buildRustPackage rec { pname = "rust-analyzer-unwrapped"; - version = "2021-12-13"; - cargoSha256 = "sha256-VF4pwSl3Wei7KxyQFOPj7hVX/NG2zImRLv4iN+ijAs8="; + version = "2021-12-27"; + cargoSha256 = "sha256-yok7kLcvKvDwrdgJR0540QLJi5/zXi0NyZxhtoQ8Xno="; src = fetchFromGitHub { owner = "rust-analyzer"; repo = "rust-analyzer"; rev = version; - sha256 = "sha256-xt7iDfIoaBhStgqsgttyOFF4NYPQ8jeVwDoYUwrvtrA="; + sha256 = "sha256-/195+NsV6Mku2roi8zVy4dw8QGL6rQcnPcQ29Os8oqs="; }; patches = [ # Code format and git history check require more dependencies but don't really matter for packaging. # So just ignore them. ./ignore-git-and-rustfmt-tests.patch - - # Remove when we have rustc >= 1.57.0. - ./no-1-57-map-while.patch ]; buildAndTestSubdir = "crates/rust-analyzer"; diff --git a/pkgs/development/tools/rust/rust-analyzer/no-1-57-map-while.patch b/pkgs/development/tools/rust/rust-analyzer/no-1-57-map-while.patch deleted file mode 100644 index 6114f51831be..000000000000 --- a/pkgs/development/tools/rust/rust-analyzer/no-1-57-map-while.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/crates/ide_db/src/helpers.rs -+++ b/crates/ide_db/src/helpers.rs -@@ -309,7 +309,7 @@ pub fn lint_eq_or_in_group(lint: &str, lint_is: &str) -> bool { - pub fn parse_tt_as_comma_sep_paths(input: ast::TokenTree) -> Option> { - let r_paren = input.r_paren_token(); - let tokens = -- input.syntax().children_with_tokens().skip(1).map_while(|it| match it.into_token() { -+ input.syntax().children_with_tokens().skip(1).map(|it| match it.into_token() { - // seeing a keyword means the attribute is unclosed so stop parsing here - Some(tok) if tok.kind().is_keyword() => None, - // don't include the right token tree parenthesis if it exists -@@ -317,7 +317,7 @@ pub fn parse_tt_as_comma_sep_paths(input: ast::TokenTree) -> Option None, - Some(tok) => Some(tok), -- }); -+ }).take_while(|tok| tok.is_some()).map(|tok| tok.unwrap()); - let input_expressions = tokens.into_iter().group_by(|tok| tok.kind() == T![,]); - let paths = input_expressions - .into_iter()