Skip to content

Send + Sync in errors are unsound #1137

@Lucretiel

Description

@Lucretiel

unsafe impl Sync for Error {}
unsafe impl Send for Error {}

Currently, the unsafe Send + Sync implementations for Error are unsound, because the source: Box<dyn StdError> doesn't require Send + Sync. When fixing this (by adding dyn Send + Sync to source, and removing unsafe impl Synd and Sync) we encounter compile errors due to syntect exporting a dyn Error + Send (no Sync). I've opened trishume/syntect#304 to fix that; once complete, we can fix the issue in Zola as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions