Revert "Revert "chore: Bump Rust to 1.89 (#35788)"" (#35937)

Reverts zed-industries/zed#35843

Docker image for 1.89 is now up.
This commit is contained in:
Piotr Osiewicz 2025-08-09 23:48:58 +02:00 committed by GitHub
parent 5901aec40a
commit daa53f2761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 35 additions and 55 deletions

View file

@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2 # syntax = docker/dockerfile:1.2
FROM rust:1.88-bookworm as builder FROM rust:1.89-bookworm as builder
WORKDIR app WORKDIR app
COPY . . COPY . .

View file

@ -402,11 +402,11 @@ impl GitRepository for FakeGitRepository {
&self, &self,
_paths: Vec<RepoPath>, _paths: Vec<RepoPath>,
_env: Arc<HashMap<String, String>>, _env: Arc<HashMap<String, String>>,
) -> BoxFuture<Result<()>> { ) -> BoxFuture<'_, Result<()>> {
unimplemented!() unimplemented!()
} }
fn stash_pop(&self, _env: Arc<HashMap<String, String>>) -> BoxFuture<Result<()>> { fn stash_pop(&self, _env: Arc<HashMap<String, String>>) -> BoxFuture<'_, Result<()>> {
unimplemented!() unimplemented!()
} }

View file

@ -399,9 +399,9 @@ pub trait GitRepository: Send + Sync {
&self, &self,
paths: Vec<RepoPath>, paths: Vec<RepoPath>,
env: Arc<HashMap<String, String>>, env: Arc<HashMap<String, String>>,
) -> BoxFuture<Result<()>>; ) -> BoxFuture<'_, Result<()>>;
fn stash_pop(&self, env: Arc<HashMap<String, String>>) -> BoxFuture<Result<()>>; fn stash_pop(&self, env: Arc<HashMap<String, String>>) -> BoxFuture<'_, Result<()>>;
fn push( fn push(
&self, &self,
@ -1203,7 +1203,7 @@ impl GitRepository for RealGitRepository {
&self, &self,
paths: Vec<RepoPath>, paths: Vec<RepoPath>,
env: Arc<HashMap<String, String>>, env: Arc<HashMap<String, String>>,
) -> BoxFuture<Result<()>> { ) -> BoxFuture<'_, Result<()>> {
let working_directory = self.working_directory(); let working_directory = self.working_directory();
self.executor self.executor
.spawn(async move { .spawn(async move {
@ -1227,7 +1227,7 @@ impl GitRepository for RealGitRepository {
.boxed() .boxed()
} }
fn stash_pop(&self, env: Arc<HashMap<String, String>>) -> BoxFuture<Result<()>> { fn stash_pop(&self, env: Arc<HashMap<String, String>>) -> BoxFuture<'_, Result<()>> {
let working_directory = self.working_directory(); let working_directory = self.working_directory();
self.executor self.executor
.spawn(async move { .spawn(async move {

View file

@ -461,6 +461,8 @@ fn skip_whitespace(source: &str) -> &str {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use core::slice;
use super::*; use super::*;
use crate as gpui; use crate as gpui;
use KeyBindingContextPredicate::*; use KeyBindingContextPredicate::*;
@ -674,11 +676,11 @@ mod tests {
assert!(predicate.eval(&contexts)); assert!(predicate.eval(&contexts));
assert!(!predicate.eval(&[])); assert!(!predicate.eval(&[]));
assert!(!predicate.eval(&[child_context.clone()])); assert!(!predicate.eval(slice::from_ref(&child_context)));
assert!(!predicate.eval(&[parent_context])); assert!(!predicate.eval(&[parent_context]));
let zany_predicate = KeyBindingContextPredicate::parse("child > child").unwrap(); let zany_predicate = KeyBindingContextPredicate::parse("child > child").unwrap();
assert!(!zany_predicate.eval(&[child_context.clone()])); assert!(!zany_predicate.eval(slice::from_ref(&child_context)));
assert!(zany_predicate.eval(&[child_context.clone(), child_context.clone()])); assert!(zany_predicate.eval(&[child_context.clone(), child_context.clone()]));
} }
@ -690,13 +692,13 @@ mod tests {
let parent_context = KeyContext::try_from("parent").unwrap(); let parent_context = KeyContext::try_from("parent").unwrap();
let child_context = KeyContext::try_from("child").unwrap(); let child_context = KeyContext::try_from("child").unwrap();
assert!(not_predicate.eval(&[workspace_context.clone()])); assert!(not_predicate.eval(slice::from_ref(&workspace_context)));
assert!(!not_predicate.eval(&[editor_context.clone()])); assert!(!not_predicate.eval(slice::from_ref(&editor_context)));
assert!(!not_predicate.eval(&[editor_context.clone(), workspace_context.clone()])); assert!(!not_predicate.eval(&[editor_context.clone(), workspace_context.clone()]));
assert!(!not_predicate.eval(&[workspace_context.clone(), editor_context.clone()])); assert!(!not_predicate.eval(&[workspace_context.clone(), editor_context.clone()]));
let complex_not = KeyBindingContextPredicate::parse("!editor && workspace").unwrap(); let complex_not = KeyBindingContextPredicate::parse("!editor && workspace").unwrap();
assert!(complex_not.eval(&[workspace_context.clone()])); assert!(complex_not.eval(slice::from_ref(&workspace_context)));
assert!(!complex_not.eval(&[editor_context.clone(), workspace_context.clone()])); assert!(!complex_not.eval(&[editor_context.clone(), workspace_context.clone()]));
let not_mode_predicate = KeyBindingContextPredicate::parse("!(mode == full)").unwrap(); let not_mode_predicate = KeyBindingContextPredicate::parse("!(mode == full)").unwrap();
@ -709,18 +711,18 @@ mod tests {
assert!(not_mode_predicate.eval(&[other_mode_context])); assert!(not_mode_predicate.eval(&[other_mode_context]));
let not_descendant = KeyBindingContextPredicate::parse("!(parent > child)").unwrap(); let not_descendant = KeyBindingContextPredicate::parse("!(parent > child)").unwrap();
assert!(not_descendant.eval(&[parent_context.clone()])); assert!(not_descendant.eval(slice::from_ref(&parent_context)));
assert!(not_descendant.eval(&[child_context.clone()])); assert!(not_descendant.eval(slice::from_ref(&child_context)));
assert!(!not_descendant.eval(&[parent_context.clone(), child_context.clone()])); assert!(!not_descendant.eval(&[parent_context.clone(), child_context.clone()]));
let not_descendant = KeyBindingContextPredicate::parse("parent > !child").unwrap(); let not_descendant = KeyBindingContextPredicate::parse("parent > !child").unwrap();
assert!(!not_descendant.eval(&[parent_context.clone()])); assert!(!not_descendant.eval(slice::from_ref(&parent_context)));
assert!(!not_descendant.eval(&[child_context.clone()])); assert!(!not_descendant.eval(slice::from_ref(&child_context)));
assert!(!not_descendant.eval(&[parent_context.clone(), child_context.clone()])); assert!(!not_descendant.eval(&[parent_context.clone(), child_context.clone()]));
let double_not = KeyBindingContextPredicate::parse("!!editor").unwrap(); let double_not = KeyBindingContextPredicate::parse("!!editor").unwrap();
assert!(double_not.eval(&[editor_context.clone()])); assert!(double_not.eval(slice::from_ref(&editor_context)));
assert!(!double_not.eval(&[workspace_context.clone()])); assert!(!double_not.eval(slice::from_ref(&workspace_context)));
// Test complex descendant cases // Test complex descendant cases
let workspace_context = KeyContext::try_from("Workspace").unwrap(); let workspace_context = KeyContext::try_from("Workspace").unwrap();
@ -754,9 +756,9 @@ mod tests {
// !Workspace - shouldn't match when Workspace is in the context // !Workspace - shouldn't match when Workspace is in the context
let not_workspace = KeyBindingContextPredicate::parse("!Workspace").unwrap(); let not_workspace = KeyBindingContextPredicate::parse("!Workspace").unwrap();
assert!(!not_workspace.eval(&[workspace_context.clone()])); assert!(!not_workspace.eval(slice::from_ref(&workspace_context)));
assert!(not_workspace.eval(&[pane_context.clone()])); assert!(not_workspace.eval(slice::from_ref(&pane_context)));
assert!(not_workspace.eval(&[editor_context.clone()])); assert!(not_workspace.eval(slice::from_ref(&editor_context)));
assert!(!not_workspace.eval(&workspace_pane_editor)); assert!(!not_workspace.eval(&workspace_pane_editor));
} }
} }

View file

@ -1,28 +1,6 @@
use std::ops::Deref; use std::ops::Deref;
use windows::Win32::{Foundation::HANDLE, UI::WindowsAndMessaging::HCURSOR}; use windows::Win32::UI::WindowsAndMessaging::HCURSOR;
#[derive(Debug, Clone, Copy)]
pub(crate) struct SafeHandle {
raw: HANDLE,
}
unsafe impl Send for SafeHandle {}
unsafe impl Sync for SafeHandle {}
impl From<HANDLE> for SafeHandle {
fn from(value: HANDLE) -> Self {
SafeHandle { raw: value }
}
}
impl Deref for SafeHandle {
type Target = HANDLE;
fn deref(&self) -> &Self::Target {
&self.raw
}
}
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub(crate) struct SafeCursor { pub(crate) struct SafeCursor {

View file

@ -136,7 +136,7 @@ impl BatchedTextRun {
.shape_line( .shape_line(
self.text.clone().into(), self.text.clone().into(),
self.font_size.to_pixels(window.rem_size()), self.font_size.to_pixels(window.rem_size()),
&[self.style.clone()], std::slice::from_ref(&self.style),
Some(dimensions.cell_width), Some(dimensions.cell_width),
) )
.paint(pos, dimensions.line_height, window, cx); .paint(pos, dimensions.line_height, window, cx);

18
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1750266157, "lastModified": 1754269165,
"narHash": "sha256-tL42YoNg9y30u7zAqtoGDNdTyXTi8EALDeCB13FtbQA=", "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "e37c943371b73ed87faf33f7583860f81f1d5a48", "rev": "444e81206df3f7d92780680e45858e31d2f07a08",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -33,10 +33,10 @@
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 315532800, "lastModified": 315532800,
"narHash": "sha256-j+zO+IHQ7VwEam0pjPExdbLT2rVioyVS3iq4bLO3GEc=", "narHash": "sha256-5VYevX3GccubYeccRGAXvCPA1ktrGmIX1IFC0icX07g=",
"rev": "61c0f513911459945e2cb8bf333dc849f1b976ff", "rev": "a683adc19ff5228af548c6539dbc3440509bfed3",
"type": "tarball", "type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre821324.61c0f5139114/nixexprs.tar.xz" "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre840248.a683adc19ff5/nixexprs.tar.xz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -58,11 +58,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750964660, "lastModified": 1754575663,
"narHash": "sha256-YQ6EyFetjH1uy5JhdhRdPe6cuNXlYpMAQePFfZj4W7M=", "narHash": "sha256-afOx8AG0KYtw7mlt6s6ahBBy7eEHZwws3iCRoiuRQS4=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "04f0fcfb1a50c63529805a798b4b5c21610ff390", "rev": "6db0fb0e9cec2e9729dc52bf4898e6c135bb8a0f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +1,5 @@
[toolchain] [toolchain]
channel = "1.88" channel = "1.89"
profile = "minimal" profile = "minimal"
components = [ "rustfmt", "clippy" ] components = [ "rustfmt", "clippy" ]
targets = [ targets = [