Unverified Commit 6dfcffe1 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Upgrade rustc to 2026-02-05 (#89591)

- checked_div 
- loop -> while
parent 522de8c3
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"dependsOn": { "dependsOn": {
"ghcr.io/devcontainers/features/rust:1": { "ghcr.io/devcontainers/features/rust:1": {
// this should match the `rust-toolchain.toml` // this should match the `rust-toolchain.toml`
"version": "nightly-2026-01-04", "version": "nightly-2026-02-05",
"profile": "minimal", "profile": "minimal",
"components": "rustfmt,clippy,rust-analyzer" "components": "rustfmt,clippy,rust-analyzer"
} }
......
# if you update this, also update `.devcontainer/rust/devcontainer-feature.json` # if you update this, also update `.devcontainer/rust/devcontainer-feature.json`
[toolchain] [toolchain]
channel = "nightly-2026-01-04" channel = "nightly-2026-02-05"
components = ["rustfmt", "clippy", "rust-analyzer"] components = ["rustfmt", "clippy", "rust-analyzer"]
profile = "minimal" profile = "minimal"
...@@ -21,7 +21,7 @@ error[E0277]: the trait bound `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitr ...@@ -21,7 +21,7 @@ error[E0277]: the trait bound `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitr
| |
= help: the trait `turbo_tasks::task::function::TaskFnInputFunctionWithThis<_, _, _>` is not implemented for fn item `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitrary_self_type_turbo_tasks_function_inline}` = help: the trait `turbo_tasks::task::function::TaskFnInputFunctionWithThis<_, _, _>` is not implemented for fn item `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitrary_self_type_turbo_tasks_function_inline}`
= note: required for `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitrary_self_type_turbo_tasks_function_inline}` to implement `turbo_tasks::task::function::IntoTaskFnWithThis<_, _, _>` = note: required for `fn(OperationVc<Foobar>) -> Vc<()> {Foobar::arbitrary_self_type_turbo_tasks_function_inline}` to implement `turbo_tasks::task::function::IntoTaskFnWithThis<_, _, _>`
note: required by a bound in `NativeFunction::new_method` note: required by a bound in `turbo_tasks::macro_helpers::NativeFunction::new_method`
--> $WORKSPACE/turbopack/crates/turbo-tasks/src/native_function.rs --> $WORKSPACE/turbopack/crates/turbo-tasks/src/native_function.rs
| |
| pub fn new_method<Mode, This, Inputs, I>( | pub fn new_method<Mode, This, Inputs, I>(
......
...@@ -14,7 +14,7 @@ error[E0277]: the trait bound `Vc<i32>: NonLocalValue` is not satisfied ...@@ -14,7 +14,7 @@ error[E0277]: the trait bound `Vc<i32>: NonLocalValue` is not satisfied
(D, C, B, A, Z, Y, X, W, V, U, T) (D, C, B, A, Z, Y, X, W, V, U, T)
(E, D, C, B, A, Z, Y, X, W, V, U, T) (E, D, C, B, A, Z, Y, X, W, V, U, T)
and $N others and $N others
note: required by a bound in `assert_argument_is_non_local_value` note: required by a bound in `turbo_tasks::macro_helpers::assert_argument_is_non_local_value`
--> $WORKSPACE/turbopack/crates/turbo-tasks/src/macro_helpers.rs --> $WORKSPACE/turbopack/crates/turbo-tasks/src/macro_helpers.rs
| |
| pub fn assert_argument_is_non_local_value<Argument: NonLocalValue>() {} | pub fn assert_argument_is_non_local_value<Argument: NonLocalValue>() {}
......
...@@ -209,8 +209,10 @@ pub async fn make_production_chunks( ...@@ -209,8 +209,10 @@ pub async fn make_production_chunks(
min_chunk_size min_chunk_size
} else if let Some(smallest) = heap.peek() { } else if let Some(smallest) = heap.peek() {
smallest.size smallest.size
} else if max_chunk_count_per_group != 0 { } else if let Some(merge_threshold) =
chunks_to_merge_size / max_chunk_count_per_group chunks_to_merge_size.checked_div(max_chunk_count_per_group)
{
merge_threshold
} else { } else {
unreachable!(); unreachable!();
}; };
......
...@@ -694,7 +694,7 @@ pub trait AliasTemplate { ...@@ -694,7 +694,7 @@ pub trait AliasTemplate {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use std::assert_matches::assert_matches; use core::assert_matches;
use anyhow::Result; use anyhow::Result;
use turbo_rcstr::rcstr; use turbo_rcstr::rcstr;
......
...@@ -183,10 +183,7 @@ impl TraceFormat for HeaptrackFormat { ...@@ -183,10 +183,7 @@ impl TraceFormat for HeaptrackFormat {
let mut bytes_read = 0; let mut bytes_read = 0;
let mut outdated_spans = FxHashSet::default(); let mut outdated_spans = FxHashSet::default();
let mut store = self.store.write(); let mut store = self.store.write();
'outer: loop { 'outer: while let Some(line_end) = buffer.iter().position(|b| *b == b'\n') {
let Some(line_end) = buffer.iter().position(|b| *b == b'\n') else {
break;
};
let full_line = &buffer[..line_end]; let full_line = &buffer[..line_end];
buffer = &buffer[line_end + 1..]; buffer = &buffer[line_end + 1..];
bytes_read += full_line.len() + 1; bytes_read += full_line.len() + 1;
......
...@@ -28,10 +28,7 @@ impl TraceFormat for NextJsFormat { ...@@ -28,10 +28,7 @@ impl TraceFormat for NextJsFormat {
fn read(&mut self, mut buffer: &[u8], _reuse: &mut Self::Reused) -> anyhow::Result<usize> { fn read(&mut self, mut buffer: &[u8], _reuse: &mut Self::Reused) -> anyhow::Result<usize> {
let mut bytes_read = 0; let mut bytes_read = 0;
let mut outdated_spans = FxHashSet::default(); let mut outdated_spans = FxHashSet::default();
loop { while let Some(line_end) = buffer.iter().position(|b| *b == b'\n') {
let Some(line_end) = buffer.iter().position(|b| *b == b'\n') else {
break;
};
let line = &buffer[..line_end]; let line = &buffer[..line_end];
buffer = &buffer[line_end + 1..]; buffer = &buffer[line_end + 1..];
bytes_read += line.len() + 1; bytes_read += line.len() + 1;
......
...@@ -184,7 +184,7 @@ impl ValueMode { ...@@ -184,7 +184,7 @@ impl ValueMode {
/// ///
/// cases where count per time is very low is probably not important /// cases where count per time is very low is probably not important
fn value_over_time(value: u64, time: Timestamp) -> u64 { fn value_over_time(value: u64, time: Timestamp) -> u64 {
if *time == 0 { 0 } else { value / *time } value.checked_div(*time).unwrap_or(0)
} }
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment