Skip to content

Commit 38c7122

Browse files
committed
chore: update to Rust 1.90.0
1 parent 9157566 commit 38c7122

File tree

7 files changed

+40
-55
lines changed

7 files changed

+40
-55
lines changed

crates/turborepo-lib/src/engine/builder.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,18 @@ impl<'a> EngineBuilder<'a> {
732732
.load(package_name)
733733
.map(Some)
734734
.or_else(|err| {
735-
if let Some((span, text)) = read_req.required()
736-
&& matches!(err, config::Error::NoTurboJSON)
737-
{
738-
Err(Error::MissingTurboJsonExtends(Box::new(
739-
MissingTurboJsonExtends {
740-
package_name: read_req.package_name().to_string(),
741-
span,
742-
text,
743-
},
744-
)))
735+
if let Some((span, text)) = read_req.required() {
736+
if matches!(err, config::Error::NoTurboJSON) {
737+
Err(Error::MissingTurboJsonExtends(Box::new(
738+
MissingTurboJsonExtends {
739+
package_name: read_req.package_name().to_string(),
740+
span,
741+
text,
742+
},
743+
)))
744+
} else {
745+
Err(err.into())
746+
}
745747
} else if matches!(err, config::Error::NoTurboJSON) {
746748
Ok(None)
747749
} else {

crates/turborepo-lib/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(once_cell_try)]
55
#![feature(try_blocks)]
66
#![feature(impl_trait_in_assoc_type)]
7-
#![feature(let_chains)]
87
#![deny(clippy::all)]
98
// Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299
109
#![allow(clippy::needless_pass_by_ref_mut)]

crates/turborepo-lib/src/turbo_json/validator.rs

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,27 @@ pub fn validate_extends(validator: &Validator, turbo_json: &TurboJson) -> Vec<Er
9898
text: NamedSource::new(path, text),
9999
}];
100100
}
101-
if let Some(package_name) = turbo_json.extends.first()
102-
&& package_name != ROOT_PKG_NAME
103-
&& validator.non_root_extends
104-
{
105-
let path = turbo_json
106-
.path
107-
.as_ref()
108-
.map_or("turbo.json", |p| p.as_ref());
101+
if let Some(package_name) = turbo_json.extends.first() {
102+
if package_name != ROOT_PKG_NAME && validator.non_root_extends {
103+
let path = turbo_json
104+
.path
105+
.as_ref()
106+
.map_or("turbo.json", |p| p.as_ref());
109107

110-
let (span, text) = match turbo_json.text {
111-
Some(ref text) => {
112-
let len = text.len();
113-
let span: SourceSpan = (0, len - 1).into();
114-
(Some(span), text.to_string())
115-
}
116-
None => (None, String::new()),
117-
};
118-
// Root needs to be first
119-
return vec![Error::ExtendsRootFirst {
120-
span,
121-
text: NamedSource::new(path, text),
122-
}];
108+
let (span, text) = match turbo_json.text {
109+
Some(ref text) => {
110+
let len = text.len();
111+
let span: SourceSpan = (0, len - 1).into();
112+
(Some(span), text.to_string())
113+
}
114+
None => (None, String::new()),
115+
};
116+
// Root needs to be first
117+
return vec![Error::ExtendsRootFirst {
118+
span,
119+
text: NamedSource::new(path, text),
120+
}];
121+
}
123122
}
124123
// If we allow for non-root extends we don't need to perform this check
125124
(!validator.non_root_extends

crates/turborepo-vt100/src/attrs.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use crate::term::BufWrite as _;
22

33
/// Represents a foreground or background color for cells.
4-
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
4+
#[derive(Eq, PartialEq, Debug, Default, Copy, Clone)]
55
pub enum Color {
66
/// The default terminal color.
7+
#[default]
78
Default,
89

910
/// An indexed terminal color.
@@ -13,12 +14,6 @@ pub enum Color {
1314
Rgb(u8, u8, u8),
1415
}
1516

16-
impl Default for Color {
17-
fn default() -> Self {
18-
Self::Default
19-
}
20-
}
21-
2217
const TEXT_MODE_BOLD: u8 = 0b0000_0001;
2318
const TEXT_MODE_ITALIC: u8 = 0b0000_0010;
2419
const TEXT_MODE_UNDERLINE: u8 = 0b0000_0100;

crates/turborepo-vt100/src/screen.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ const MODE_ALTERNATE_SCREEN: u8 = 0b0000_1000;
88
const MODE_BRACKETED_PASTE: u8 = 0b0001_0000;
99

1010
/// The xterm mouse handling mode currently in use.
11-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
11+
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
1212
pub enum MouseProtocolMode {
1313
/// Mouse handling is disabled.
14+
#[default]
1415
None,
1516

1617
/// Mouse button events should be reported on button press. Also known as
@@ -34,16 +35,11 @@ pub enum MouseProtocolMode {
3435
// DecLocator,
3536
}
3637

37-
impl Default for MouseProtocolMode {
38-
fn default() -> Self {
39-
Self::None
40-
}
41-
}
42-
4338
/// The encoding to use for the enabled `MouseProtocolMode`.
44-
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
39+
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
4540
pub enum MouseProtocolEncoding {
4641
/// Default single-printable-byte encoding.
42+
#[default]
4743
Default,
4844

4945
/// UTF-8-based encoding.
@@ -54,12 +50,6 @@ pub enum MouseProtocolEncoding {
5450
// Urxvt,
5551
}
5652

57-
impl Default for MouseProtocolEncoding {
58-
fn default() -> Self {
59-
Self::Default
60-
}
61-
}
62-
6353
/// Represents the overall terminal state.
6454
#[derive(Clone, Debug)]
6555
pub struct Screen {

packages/turbo-repository/scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ script_provided_flags="\
1313
for flag in $user_provided_flags; do
1414
if [[ $flag == --target=* ]]; then
1515
target=${flag#*=}
16-
rustup toolchain install nightly-2025-06-20 --target "$target"
16+
rustup toolchain install nightly-2025-08-01 --target "$target"
1717

1818
# For we need to cross-compile some targets with Zig
1919
# Fortunately, napi comes with a `--zig` flag

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
22
# Needs to be copied to `packages/turbo-repository/scripts/build.sh`
3-
channel = "nightly-2025-06-20"
3+
channel = "nightly-2025-08-01"
44
components = ["rustfmt", "clippy"]
55
profile = "minimal"

0 commit comments

Comments
 (0)