Remove support for non-inline snapshots

This commit is contained in:
David Tolnay 2019-05-09 13:19:26 -07:00
parent fcd53cf619
commit 053a9d3af4
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -39,11 +39,6 @@ macro_rules! snapshot {
#[macro_export]
macro_rules! snapshot_impl {
(($($expr:tt)*) as $t:ty) => {{
let syntax_tree = ::macros::Tokens::parse::<$t>($($expr)*).unwrap();
insta::assert_debug_snapshot_matches!(syntax_tree);
syntax_tree
}};
(($expr:ident) as $t:ty, @$snapshot:literal) => {
let $expr = ::macros::Tokens::parse::<$t>($expr).unwrap();
let debug = crate::macros::debug::Lite(&$expr);
@ -55,11 +50,6 @@ macro_rules! snapshot_impl {
insta::assert_debug_snapshot_matches!(debug, @$snapshot);
syntax_tree
}};
(($($expr:tt)*)) => {{
let syntax_tree = $($expr)*;
insta::assert_debug_snapshot_matches!(syntax_tree);
syntax_tree
}};
(($($expr:tt)*) , @$snapshot:literal) => {{
let syntax_tree = $($expr)*;
let debug = crate::macros::debug::Lite(&syntax_tree);