swc/macros/ast_node/tests/attr_interop.rs
강동윤 9d7af34aab
Initial release (#45)
common:
 - rename `Folder` to `Fold`
 - folder.then()
 - impl Fold for Box<F>
 - impl Fold<T> for &mut F where F: Fold<T>

transforms:
 - make Simplifier private
 - organize compat

codegen:
 - use `Mark` to avoid deoptimization

swc:
 - upgrade rayon and use global thread pool instead
2018-11-10 17:44:35 +09:00

23 lines
517 B
Rust

//! Test that `#[span]` and `#[fold]` can be used at same time.
extern crate swc_common;
extern crate swc_macros;
use swc_common::{Fold, Span, Spanned};
use swc_macros::ast_node;
#[ast_node]
// See https://github.com/rust-lang/rust/issues/44925
pub struct Class {
#[span]
pub has_span: HasSpan,
#[fold(ignore)]
pub s: String,
}
#[ast_node]
pub struct Tuple(#[span] HasSpan, #[fold(ignore)] usize, usize);
#[derive(Debug, Clone, PartialEq, Fold, Spanned)]
pub struct HasSpan {
pub span: Span,
}