1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::{cell::RefCell, rc::Rc, sync::Arc};

use swc_common::Span;

/// Marker to prevent mistakes.
pub trait Visitable {}

impl<T> Visitable for Vec<T> where T: Visitable {}

impl<T> Visitable for [T] where T: Visitable {}

impl<T> Visitable for Box<T> where T: ?Sized + Visitable {}

impl<T> Visitable for &'_ T where T: ?Sized + Visitable {}

impl<T> Visitable for &'_ mut T where T: ?Sized + Visitable {}

impl<T> Visitable for Rc<T> where T: Visitable {}

impl<T> Visitable for Arc<T> where T: Visitable {}

impl<T> Visitable for Option<T> where T: Visitable {}

impl<T> Visitable for RefCell<T> where T: Visitable {}

impl Visitable for Span {}