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
6 changes: 4 additions & 2 deletions .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
rustup override set nightly
cargo miri setup

# `--lib --bins --tests` omits doctests, which Miri can't run
# https://github.com/oxc-project/oxc/pull/11092
- name: Test with Miri
run: |
cargo miri test --doc --all-features -p oxc_ast -p oxc_data_structures
cargo miri test -p oxc_parser -p oxc_transformer
cargo miri test --lib --bins --tests --all-features -p oxc_ast -p oxc_data_structures
cargo miri test --lib --bins --tests -p oxc_parser -p oxc_transformer
5 changes: 4 additions & 1 deletion crates/oxc_allocator/src/vec2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,10 @@ impl<'bump, T: 'bump> Vec<'bump, T> {
/// except by the pointer `other`, and that they are not read after this call.
#[inline]
unsafe fn append_elements(&mut self, other: *const [T]) {
let count = (*other).len();
// See https://github.com/oxc-project/oxc/pull/11092 for why this `#[allow]` attribute.
// TODO: Remove this once we bump MSRV and it's no longer required.
#[allow(clippy::needless_borrow, clippy::allow_attributes)]
let count = (&*other).len();
self.reserve(count);
let len = self.len();
ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count);
Expand Down
Loading