Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update rust version #8256

Merged
merged 11 commits into from
Jun 1, 2024
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
18 changes: 13 additions & 5 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,5 @@ which = "4.4.0"
unicode-segmentation = "1.10.1"

[patch.crates-io]
pathfinder_simd = { git = "https://github.com/servo/pathfinder", rev = "30419d" }
# TODO: Use upstream when https://github.com/servo/pathfinder/pull/566 lands
pathfinder_simd = { git = "https://github.com/vercel/pathfinder", branch = "rm-stdarch_arm_crc32" }
2 changes: 2 additions & 0 deletions crates/node-file-trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ bench = false
[features]
default = ["cli", "custom_allocator"]
cli = ["dep:clap", "turbo-tasks-malloc"]
persistent_cache = []
serializable = []
tokio_console = [
"dep:console-subscriber",
"tokio/tracing",
Expand Down
1 change: 1 addition & 0 deletions crates/turbo-tasks-fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#![feature(round_char_boundary)]
#![feature(arbitrary_self_types)]
#![feature(lint_reasons)]
#![allow(clippy::mutable_key_type)]

pub mod attach;
pub mod embed;
Expand Down
8 changes: 4 additions & 4 deletions crates/turbo-tasks-macros-shared/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use syn::{
/// Requires several Fn helpers which perform expand different structures:
///
/// - [expand_named] handles the expansion of a struct or enum variant with
/// named fields (e.g. `struct Foo { bar: u32 }`, `Foo::Bar { baz: u32 }`).
/// named fields (e.g. `struct Foo { bar: u32 }`, `Foo::Bar { baz: u32 }`).
/// - [expand_unnamed] handles the expansion of a struct or enum variant with
/// unnamed fields (e.g. `struct Foo(u32)`, `Foo::Bar(u32)`).
/// - [expand_unit] handles the expansion of a unit struct or enum (e.g.
/// `struct Foo;`, `Foo::Bar`).
/// unnamed fields (e.g. `struct Foo(u32)`, `Foo::Bar(u32)`).
/// - [expand_unit] handles the expansion of a unit struct or enum (e.g. `struct
/// Foo;`, `Foo::Bar`).
///
/// These helpers should themselves call [generate_destructuring] to generate
/// the destructure necessary to access the fields of the value.
Expand Down
1 change: 1 addition & 0 deletions crates/turbo-tasks-memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ turbo-tasks-build = { workspace = true }

[features]
track_unfinished = []
track_wait_dependencies = []
unsafe_once_map = []
log_running_tasks = []
log_scheduled_tasks = []
Expand Down
2 changes: 2 additions & 0 deletions crates/turbopack-binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ __turbopack_node_dynamic_embed_contents = [
]
__turbopack_static = ["__turbopack", "turbopack-static"]
__turbopack_swc_utils = ["__turbopack", "turbopack-swc-utils"]
__turbopack_tests = []
__turbopack_test_utils = ["__turbopack", "turbopack-test-utils"]

__features = []
Expand All @@ -163,6 +164,7 @@ __feature_node_file_trace_custom_allocator = [
"node-file-trace/custom_allocator",
]
__feature_auto_hash_map = ["__features", "auto-hash-map"]
__feature_swc_ast_explorer = []
__feature_tracing_signpost = ["__features", "tracing-signpost"]

__swc_custom_transform = []
Expand Down
28 changes: 14 additions & 14 deletions crates/turbopack-cli-utils/src/issue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ impl<'de> serde::Deserialize<'de> for IssueSeverityCliOption {
impl clap::ValueEnum for IssueSeverityCliOption {
fn value_variants<'a>() -> &'a [Self] {
const VARIANTS: [IssueSeverityCliOption; 8] = [
Self(IssueSeverity::Bug),
Self(IssueSeverity::Fatal),
Self(IssueSeverity::Error),
Self(IssueSeverity::Warning),
Self(IssueSeverity::Hint),
Self(IssueSeverity::Note),
Self(IssueSeverity::Suggestion),
Self(IssueSeverity::Info),
IssueSeverityCliOption(IssueSeverity::Bug),
IssueSeverityCliOption(IssueSeverity::Fatal),
IssueSeverityCliOption(IssueSeverity::Error),
IssueSeverityCliOption(IssueSeverity::Warning),
IssueSeverityCliOption(IssueSeverity::Hint),
IssueSeverityCliOption(IssueSeverity::Note),
IssueSeverityCliOption(IssueSeverity::Suggestion),
IssueSeverityCliOption(IssueSeverity::Info),
];
&VARIANTS
}
Expand Down Expand Up @@ -218,14 +218,14 @@ pub struct LogOptions {
/// graph, there are a few possibilities:
///
/// 1. An issue from this pull is brand new to all sources, in which case it
/// will be logged and the issue's count is inremented.
/// will be logged and the issue's count is inremented.
/// 2. An issue from this pull is brand new to this source but another source
/// has already pulled it, in which case it will be logged and the issue's count
/// is incremented.
/// has already pulled it, in which case it will be logged and the issue's
/// count is incremented.
/// 3. The previous pull from this source had already seen the issue, in which
/// case the issue will be skipped and the issue's count remains constant.
/// 4. An issue seen in a previous pull was not repulled, and the issue's
/// count is decremented.
/// case the issue will be skipped and the issue's count remains constant.
/// 4. An issue seen in a previous pull was not repulled, and the issue's count
/// is decremented.
///
/// Once an issue's count reaches zero, it's removed. If it is ever seen again,
/// it is considered new and will be relogged.
Expand Down
4 changes: 2 additions & 2 deletions crates/turbopack-ecmascript/src/analyzer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ enum JsValueMetaKind {
/// - Replace all built-in functions with their values when they are
/// compile-time constant.
/// - For optimization, any nested operations are replaced with
/// [JsValue::Unknown]. So only one layer of operation remains.
/// Any remaining operation or placeholder can be treated as unknown.
/// [JsValue::Unknown]. So only one layer of operation remains. Any remaining
/// operation or placeholder can be treated as unknown.
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub enum JsValue {
// LEAF VALUES
Expand Down
1 change: 1 addition & 0 deletions crates/turborepo-filewatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//! `tokio::time::interval`.

#![deny(clippy::all)]
#![allow(clippy::mutable_key_type)]
#![feature(assert_matches)]

use std::{
Expand Down
2 changes: 0 additions & 2 deletions crates/turborepo-lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#![feature(assert_matches)]
#![feature(box_patterns)]
#![feature(byte_slice_trim_ascii)]
#![feature(error_generic_member_access)]
#![feature(hash_extract_if)]
#![feature(option_get_or_insert_default)]
#![feature(once_cell_try)]
#![feature(try_blocks)]
#![feature(impl_trait_in_assoc_type)]
#![feature(lazy_cell)]
#![deny(clippy::all)]
// Clippy's needless mut lint is buggy: https://github.com/rust-lang/rust-clippy/issues/11299
#![allow(clippy::needless_pass_by_ref_mut)]
Expand Down
4 changes: 2 additions & 2 deletions crates/turborepo-lib/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ impl TurboSubscriber {
///
/// `TurboSubscriber` has optional loggers that can be enabled later:
/// - `set_daemon_logger` enables logging to a file, using the standard
/// formatter.
/// formatter.
/// - `enable_chrome_tracing` enables logging to a file, using the chrome
/// tracing formatter.
/// tracing formatter.
pub fn new_with_verbosity(verbosity: usize, ui: &UI) -> Self {
let level_override = match verbosity {
0 => None,
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-vt100/src/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@

// CSI h
#[allow(clippy::unused_self)]
pub(crate) fn sm(&mut self, params: &vte::Params) {

Check warning on line 1185 in crates/turborepo-vt100/src/screen.rs

View workflow job for this annotation

GitHub Actions / Turborepo rust clippy

this argument is a mutable reference, but not used mutably
// nothing, i think?
if log::log_enabled!(log::Level::Debug) {
log::debug!(
Expand Down Expand Up @@ -1241,7 +1241,7 @@

// CSI l
#[allow(clippy::unused_self)]
pub(crate) fn rm(&mut self, params: &vte::Params) {

Check warning on line 1244 in crates/turborepo-vt100/src/screen.rs

View workflow job for this annotation

GitHub Actions / Turborepo rust clippy

this argument is a mutable reference, but not used mutably
// nothing, i think?
if log::log_enabled!(log::Level::Debug) {
log::debug!(
Expand Down Expand Up @@ -1502,7 +1502,7 @@
}

fn u16_to_u8(i: u16) -> Option<u8> {
if i > u16::from(u8::max_value()) {
if i > u16::from(u8::MAX) {
None
} else {
// safe because we just ensured that the value fits in a u8
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2024-04-03"
channel = "nightly-2024-05-31"
components = ["rustfmt", "clippy"]
profile = "minimal"
Loading