Skip to content

Commit

Permalink
Remove FromSaved macro
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanku committed Dec 9, 2024
1 parent 2ef03de commit ff88395
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 276 deletions.
22 changes: 0 additions & 22 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,28 +301,6 @@ pub fn derive_has_layout_impl(input: TokenStream) -> TokenStream {
.into()
}

/// Generates an implementation of `FromSaved<Sim, Analysis>` for a type.
///
/// All fields of the type must implement `FromSaved`.
/// Unit structs are not supported. Enums that do not embed a field in at least
/// one variant are also not supported.
///
/// # Examples
///
#[doc = get_snippets!("core", "sim_from_saved")]
#[proc_macro_error]
#[proc_macro_derive(FromSaved, attributes(substrate))]
pub fn derive_from_saved(input: TokenStream) -> TokenStream {
let receiver = sim::save::FromSavedInputReceiver::from_derive_input(&parse_macro_input!(
input as DeriveInput
));
let receiver = handle_error!(receiver);
quote!(
#receiver
)
.into()
}

pub(crate) fn substrate_ident() -> TokenStream2 {
match crate_name("substrate").expect("substrate is present in `Cargo.toml`") {
FoundCrate::Itself => quote!(::substrate),
Expand Down
2 changes: 0 additions & 2 deletions codegen/src/sim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use syn::parse_macro_input;

use crate::substrate_ident;

pub(crate) mod save;

pub(crate) struct TuplesImpl {
max: usize,
}
Expand Down
249 changes: 0 additions & 249 deletions codegen/src/sim/save.rs

This file was deleted.

3 changes: 0 additions & 3 deletions substrate/src/simulation/data.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! Interfaces for interacting with simulation data.
pub use codegen::FromSaved;

use crate::schematic::HasNestedView;
use crate::simulation::{Analysis, SimulationContext, Simulator};

Expand Down

0 comments on commit ff88395

Please sign in to comment.