1543: use more correct phantom types for ptrs r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-07-18 15:13:57 +00:00
commit a15a278308
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ impl<N: AstNode> AstId<N> {
#[derive(Debug)]
pub(crate) struct FileAstId<N: AstNode> {
raw: ErasedFileAstId,
_ty: PhantomData<N>,
_ty: PhantomData<fn() -> N>,
}
impl<N: AstNode> Clone for FileAstId<N> {

View File

@ -36,7 +36,7 @@ impl SyntaxNodePtr {
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AstPtr<N: AstNode> {
raw: SyntaxNodePtr,
_ty: PhantomData<N>,
_ty: PhantomData<fn() -> N>,
}
impl<N: AstNode> Copy for AstPtr<N> {}