Skip to content

Outdated links in error message #1059

Open
@Bogay

Description

@Bogay

Copied from discord:

Found outdated links in the error message. Perhaps the version string could be extracted from Cargo.toml at compile time to make it more consistent?

fn generate_error_with_docs(span: proc_macro2::Span, message: &str) -> syn::Error {
    syn::Error::new(
        span,
        format!(
            "{message}\n\texpecting #[variant(...)]. See documentation:\n\thttps://docs.rs/gdnative/0.9.0/gdnative/core_types/trait.ToVariant.html#field-attributes"
        ),
    )
}

fn generate_error_with_docs(span: proc_macro2::Span, message: &str) -> syn::Error {
syn::Error::new(
span,
format!(
"{message}\n\texpecting #[variant(...)]. See documentation:\n\thttps://docs.rs/gdnative/0.9.0/gdnative/core_types/trait.ToVariant.html#field-attributes"
),
)
}

another one with similar signature:

fn generate_error_with_docs(span: Span, message: &str) -> syn::Error {
syn::Error::new(
span,
format!(
"{message}\n\texpecting #[variant(...)]. See documentation:\n\thttps://docs.rs/gdnative/0.9.0/gdnative/core_types/trait.ToVariant.html#field-attributes"
),
)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions