sunscreen_compiler_macros 0.8.1

This crate contains macros that support the Sunscreen compiler.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use proc_macro2::Span;

#[derive(Debug, Clone, thiserror::Error)]
pub enum Error {
    #[error("{1}")]
    CompileError(Span, String),
}

impl Error {
    pub fn compile_error(span: Span, msg: &str) -> Self {
        Self::CompileError(span, msg.to_owned())
    }
}

pub type Result<T> = std::result::Result<T, Error>;