From 91dd43cb7a8c61b2978e7c96b7a63288ee1e7129 Mon Sep 17 00:00:00 2001 From: ReversedCausality Date: Fri, 27 Oct 2023 10:16:14 +0100 Subject: [PATCH] Changed `PhantomData` to `PhantomData T>` for `Sync`. --- luisa_compute/src/lang.rs | 2 +- luisa_compute/src/resource.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/luisa_compute/src/lang.rs b/luisa_compute/src/lang.rs index d606874..7fb5446 100644 --- a/luisa_compute/src/lang.rs +++ b/luisa_compute/src/lang.rs @@ -2,7 +2,7 @@ use std::any::Any; use std::cell::{Cell, RefCell}; use std::collections::{HashMap, HashSet}; use std::fmt::Debug; -use std::rc::{Rc, Weak}; +use std::rc::Rc; use std::sync::atomic::AtomicUsize; use std::sync::{Arc, Weak as WeakArc}; use std::{env, unreachable}; diff --git a/luisa_compute/src/resource.rs b/luisa_compute/src/resource.rs index 3279f49..03aaefb 100644 --- a/luisa_compute/src/resource.rs +++ b/luisa_compute/src/resource.rs @@ -342,7 +342,7 @@ pub struct BufferView { pub(crate) offset: usize, /// length in #elements pub(crate) len: usize, - pub(crate) _marker: PhantomData, + pub(crate) _marker: PhantomData T>, } impl BufferView { #[inline] @@ -1057,7 +1057,7 @@ pub struct Tex2dView { pub(crate) format: PixelFormat, pub(crate) handle: Weak, pub(crate) level: u32, - pub(crate) marker: PhantomData, + pub(crate) marker: PhantomData T>, } #[derive(Clone)] pub struct Tex3dView { @@ -1072,7 +1072,7 @@ pub struct Tex3dView { pub(crate) format: PixelFormat, pub(crate) handle: Weak, pub(crate) level: u32, - pub(crate) marker: PhantomData, + pub(crate) marker: PhantomData T>, } impl Tex2d { pub fn handle(&self) -> api::Texture {