Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/rust/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependsOn": {
"ghcr.io/devcontainers/features/rust:1": {
// this should match the `rust-toolchain.toml`
"version": "nightly-2025-09-21",
"version": "nightly-2026-01-04",
"profile": "minimal",
"components": "rustfmt,clippy,rust-analyzer"
}
Expand Down
10 changes: 4 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -484,4 +484,7 @@ webbrowser = "1.0.6"
[patch.crates-io]
bincode = { git = "https://github.com/bgw/bincode.git", branch = "bgw/patches" }
virtue = { git = "https://github.com/bgw/virtue.git", branch = "bgw/fix-generic-default-parsing" }
# We have to very frequently bump the swc major version of mdxjs-rs
mdxjs = { git = "https://github.com/vercel-labs/mdxjs-rs-turbopack.git", branch = "turbopack" }
# Doesn't compile on recent nightly versions because of https://github.com/Michael-F-Bryan/include_dir/pull/117
include_dir = { git = "https://github.com/vercel-labs/include_dir", branch = "turbopack" }
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# if you update this, also update `.devcontainer/rust/devcontainer-feature.json`
[toolchain]
channel = "nightly-2025-10-27"
channel = "nightly-2026-01-04"
components = ["rustfmt", "clippy", "rust-analyzer"]
profile = "minimal"
2 changes: 1 addition & 1 deletion turbopack/crates/turbo-tasks-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ concurrent-queue = { workspace = true }
dashmap = { workspace = true }
dunce = { workspace = true }
futures = { workspace = true }
include_dir = { version = "0.7.2", features = ["nightly"] }
include_dir = { version = "0.7.3", features = ["nightly"] }
indexmap = { workspace = true }
jsonc-parser = { version = "0.26.3", features = ["serde"] }
mime = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions turbopack/crates/turbo-tasks-fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// stdlib into our source tree
#![feature(normalize_lexically)]
#![feature(trivial_bounds)]
#![feature(downcast_unchecked)]
// Junction points are used on Windows. We could use a third-party crate for this if the junction
// API isn't eventually stabilized.
#![cfg_attr(windows, feature(junction_point))]
Expand Down
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks/src/effect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl ApplyEffectsContext {
.get_mut(&TypeId::of::<T>())
.map(|value| {
// Safety: the map is keyed by TypeId
unsafe { value.downcast_mut_unchecked() }
unsafe { value.downcast_unchecked_mut() }
})
.map(f)
})
Expand All @@ -315,7 +315,7 @@ impl ApplyEffectsContext {
});
f(
// Safety: the map is keyed by TypeId
unsafe { value.downcast_mut_unchecked() },
unsafe { value.downcast_unchecked_mut() },
)
})
}
Expand Down
1 change: 0 additions & 1 deletion turbopack/crates/turbo-tasks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#![feature(downcast_unchecked)]
#![feature(ptr_metadata)]
#![feature(sync_unsafe_cell)]
#![feature(vec_into_raw_parts)]
#![feature(async_fn_traits)]

pub mod backend;
Expand Down
13 changes: 8 additions & 5 deletions turbopack/crates/turbo-tasks/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,16 @@ impl<'scope, 'env: 'scope, R: Send + 'env> Scope<'scope, 'env, R> {
*result_cell.lock() = Some(result);
});
let f: *mut (dyn FnOnce() + Send + 'scope) = Box::into_raw(f);

// SAFETY: Scope ensures (e. g. in Drop) that spawned tasks is awaited before the
// lifetime `'env` ends.
#[allow(
clippy::unnecessary_cast,
reason = "Clippy thinks this is unnecessary, but it actually changes the lifetime"
)]
let f = f as *mut (dyn FnOnce() + Send + 'static);
let f = unsafe {
std::mem::transmute::<
*mut (dyn FnOnce() + Send + 'scope),
*mut (dyn FnOnce() + Send + 'static),
>(f)
};

// SAFETY: We just called `Box::into_raw`.
let f = unsafe { Box::from_raw(f) };

Expand Down
Loading