Skip to content

Commit 83159d5

Browse files
committed
Make clippy happy
1 parent 8ad0344 commit 83159d5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

aiscript-arena/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ impl Context {
588588
}
589589

590590
// SAFETY: the gc_box must never be accessed after calling this function.
591-
unsafe fn free_gc_box<'gc>(mut gc_box: GcBox) {
591+
unsafe fn free_gc_box(mut gc_box: GcBox) {
592592
unsafe {
593593
if gc_box.header().is_live() {
594594
// If the alive flag is set, that means we haven't dropped the inner value of this object,

aiscript-arena/src/gc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<'gc, T: 'static> Gc<'gc, T> {
126126
impl<'gc, T: ?Sized + 'gc> Gc<'gc, T> {
127127
/// Cast a `Gc` pointer to a different type.
128128
///
129-
/// SAFETY:
129+
/// # SAFETY
130130
/// It must be valid to dereference a `*mut U` that has come from casting a `*mut T`.
131131
#[inline]
132132
pub unsafe fn cast<U: 'gc>(this: Gc<'gc, T>) -> Gc<'gc, U> {
@@ -148,7 +148,7 @@ impl<'gc, T: ?Sized + 'gc> Gc<'gc, T> {
148148

149149
/// Retrieve a `Gc` from a raw pointer obtained from `Gc::as_ptr`
150150
///
151-
/// SAFETY:
151+
/// # SAFETY
152152
/// The provided pointer must have been obtained from `Gc::as_ptr`, and the pointer must not
153153
/// have been collected yet.
154154
#[inline]

aiscript-arena/src/gc_weak.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<'gc, T: ?Sized + 'gc> GcWeak<'gc, T> {
109109
impl<'gc, T: 'gc> GcWeak<'gc, T> {
110110
/// Cast the internal pointer to a different type.
111111
///
112-
/// SAFETY:
112+
/// # SAFETY
113113
/// It must be valid to dereference a `*mut U` that has come from casting a `*mut T`.
114114
#[inline]
115115
pub unsafe fn cast<U: 'gc>(this: GcWeak<'gc, T>) -> GcWeak<'gc, U> {
@@ -122,7 +122,7 @@ impl<'gc, T: 'gc> GcWeak<'gc, T> {
122122

123123
/// Retrieve a `GcWeak` from a raw pointer obtained from `GcWeak::as_ptr`
124124
///
125-
/// SAFETY:
125+
/// # SAFETY
126126
/// The provided pointer must have been obtained from `GcWeak::as_ptr` or `Gc::as_ptr`, and
127127
/// the pointer must not have been *fully* collected yet (it may be a dropped but valid weak
128128
/// pointer).

aiscript-arena/src/lock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'gc, T: Copy + 'gc> Gc<'gc, Lock<T>> {
151151
}
152152
}
153153

154-
unsafe impl<'gc, T: Collect + Copy + 'gc> Collect for Lock<T> {
154+
unsafe impl<T: Collect + Copy> Collect for Lock<T> {
155155
#[inline]
156156
fn needs_trace() -> bool {
157157
T::needs_trace()
@@ -291,7 +291,7 @@ impl<'gc, T: ?Sized + 'gc> Gc<'gc, RefLock<T>> {
291291
// required by `needs_trace`).
292292
// Fortunately this doesn't matter much as there's no way to allocate
293293
// unsized GC'd values directly.
294-
unsafe impl<'gc, T: Collect + 'gc> Collect for RefLock<T> {
294+
unsafe impl<T: Collect> Collect for RefLock<T> {
295295
#[inline]
296296
fn needs_trace() -> bool {
297297
T::needs_trace()

aiscript-vm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories.workspace = true
1313
[dependencies]
1414
aiscript-lexer = { path = "../aiscript-lexer", version = "0.1.0" }
1515
aiscript-directive = { path = "../aiscript-directive", version = "0.1.0" }
16-
aiscript-arena = { path = "../aiscript-arena", features = [
16+
aiscript-arena = { path = "../aiscript-arena", version = "0.1.0", features = [
1717
"allocator-api2",
1818
"hashbrown",
1919
] }

0 commit comments

Comments
 (0)