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: Rust v1.76.0 #2643

Merged
merged 1 commit into from
Mar 8, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
unnecessary_safety_comment = "warn"
undocumented_unsafe_blocks = "warn"
infinite_loop = "warn"
# I want to write the best Rust code so pedantic is enabled.
# We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
pedantic = { level = "warn", priority = -1 }
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_cli/src/command/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub struct LintOptions {
pub paths: Vec<PathBuf>,
}

#[allow(clippy::ptr_arg)]
fn validate_paths(paths: &Vec<PathBuf>) -> bool {
if paths.is_empty() {
true
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_codegen/src/sourcemap_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl SourcemapBuilder {
self.enable_sourcemap.then(|| self.sourcemap_builder.into_sourcemap())
}

pub fn add_source_mapping(&mut self, output: &Vec<u8>, position: u32, name: Option<&str>) {
pub fn add_source_mapping(&mut self, output: &[u8], position: u32, name: Option<&str>) {
if self.enable_sourcemap {
if matches!(self.last_position, Some(last_position) if last_position >= position) {
return;
Expand Down Expand Up @@ -94,7 +94,7 @@ impl SourcemapBuilder {
}

#[allow(clippy::cast_possible_truncation)]
fn update_generated_line_and_column(&mut self, output: &Vec<u8>) {
fn update_generated_line_and_column(&mut self, output: &[u8]) {
let remaining = &output[self.last_generated_update..];

// Find last line break
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.75.0"
channel = "1.76.0"
profile = "default"