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 @@
"dependsOn": {
"ghcr.io/devcontainers/features/rust:1": {
// this should match the `rust-toolchain.toml`
"version": "nightly-2026-01-04",
"version": "nightly-2026-02-05",
"profile": "minimal",
"components": "rustfmt,clippy,rust-analyzer"
}
......
# if you update this, also update `.devcontainer/rust/devcontainer-feature.json`
[toolchain]
channel = "nightly-2026-01-04"
channel = "nightly-2026-02-05"
components = ["rustfmt", "clippy", "rust-analyzer"]
profile = "minimal"
......@@ -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}`
= 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
|
| pub fn new_method<Mode, This, Inputs, I>(
......
......@@ -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)
(E, D, C, B, A, Z, Y, X, W, V, U, T)
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
|
| pub fn assert_argument_is_non_local_value<Argument: NonLocalValue>() {}
......
......@@ -209,8 +209,10 @@ pub async fn make_production_chunks(
min_chunk_size
} else if let Some(smallest) = heap.peek() {
smallest.size
} else if max_chunk_count_per_group != 0 {
chunks_to_merge_size / max_chunk_count_per_group
} else if let Some(merge_threshold) =
chunks_to_merge_size.checked_div(max_chunk_count_per_group)
{
merge_threshold
} else {
unreachable!();
};
......
......@@ -694,7 +694,7 @@ pub trait AliasTemplate {
#[cfg(test)]
mod test {
use std::assert_matches::assert_matches;
use core::assert_matches;
use anyhow::Result;
use turbo_rcstr::rcstr;
......
......@@ -183,10 +183,7 @@ impl TraceFormat for HeaptrackFormat {
let mut bytes_read = 0;
let mut outdated_spans = FxHashSet::default();
let mut store = self.store.write();
'outer: loop {
let Some(line_end) = buffer.iter().position(|b| *b == b'\n') else {
break;
};
'outer: while let Some(line_end) = buffer.iter().position(|b| *b == b'\n') {
let full_line = &buffer[..line_end];
buffer = &buffer[line_end + 1..];
bytes_read += full_line.len() + 1;
......
......@@ -28,10 +28,7 @@ impl TraceFormat for NextJsFormat {
fn read(&mut self, mut buffer: &[u8], _reuse: &mut Self::Reused) -> anyhow::Result<usize> {
let mut bytes_read = 0;
let mut outdated_spans = FxHashSet::default();
loop {
let Some(line_end) = buffer.iter().position(|b| *b == b'\n') else {
break;
};
while let Some(line_end) = buffer.iter().position(|b| *b == b'\n') {
let line = &buffer[..line_end];
buffer = &buffer[line_end + 1..];
bytes_read += line.len() + 1;
......
......@@ -184,7 +184,7 @@ impl ValueMode {
///
/// cases where count per time is very low is probably not important
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)]
......
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