Skip to main content

Module error

Module error 

Source

Re-exportsΒ§

use proc_macro::Diagnostic; πŸ”’ Experimental
use proc_macro::Level; πŸ”’ Experimental
use proc_macro::MultiSpan; πŸ”’ Experimental
use proc_macro2::TokenStream; πŸ”’
use quote::quote; πŸ”’
use syn::spanned::Spanned; πŸ”’
use syn::Attribute; πŸ”’
use syn::Error as SynError; πŸ”’
use syn::Meta; πŸ”’
pub(crate) use throw_span_err; πŸ”’
pub(crate) use throw_invalid_attr; πŸ”’

MacrosΒ§

throw_invalid_attr πŸ”’
Emit an error diagnostic for an invalid attribute (optionally performing additional decoration using the FnOnce passed in diag) and return Err(ErrorHandled).
throw_span_err πŸ”’
Emit a diagnostic on span $span with msg $msg (optionally performing additional decoration using the FnOnce passed in diag) and return Err(ErrorHandled).

EnumsΒ§

DiagnosticDeriveError πŸ”’

FunctionsΒ§

_throw_err πŸ”’
Helper function for use with throw_* macros - constraints $f to an impl FnOnce.
invalid_attr πŸ”’
Returns an error diagnostic for an invalid attribute.
path_to_string πŸ”’
Helper function for printing syn::Path - doesn’t handle arguments in paths and these are unlikely to come up much in use of the macro.
span_err πŸ”’
Returns an error diagnostic on span span with msg msg.