syn_merge/
lib.rs

1//! # Merge `syn` structures by adding `cfg`s
2
3#[cfg(not(feature = "std"))]
4compile_error!("The `std` feature currently must be enabled.");
5
6// use similar::algorithms::diff;
7use std::fmt;
8
9#[derive(Debug, PartialEq, Eq, Hash, Clone)]
10pub struct Error {
11    inner: String,
12}
13
14impl fmt::Display for Error {
15    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16        write!(f, "{}", self.inner)
17    }
18}
19
20impl std::error::Error for Error {}
21
22pub struct Cfgs {}
23
24pub fn merge_files(files: &[(syn::File, Cfgs)]) -> Result<syn::File, Error> {
25    todo!()
26}