Skip to content

libgit2-sys::git_error must implement core::kinds::Send #33

Closed
@akosthekiss

Description

@akosthekiss

When building cargo for aarch64 with a recent self-built rustc, I get the following error for git2:

"/home/akiss/opt/rust-aarch64-latest/bin/rustc" -V
rustc 0.13.0-dev (539d2ac4b 2014-12-27 21:37:09 +0100)
/home/akiss/opt/cargo-aarch64-latest/bin/cargo build --target aarch64-unknown-linux-gnu  
   Compiling git2 v0.1.3
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100:1: 106:2 error: the trait `core::kinds::Send` is not implemented for the type `*mut u8`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100 impl error::Error for Error {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:101     fn description(&self) -> &str {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:102         unsafe { str::from_c_str(self.raw.message as *const _) }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:103     }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:104 
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:105     fn detail(&self) -> Option<String> { Some(self.message()) }
                                                                                        ...
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100:1: 106:2 note: the type `*mut u8` must implement `core::kinds::Send` because it appears within the type `libgit2-sys::git_error`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100 impl error::Error for Error {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:101     fn description(&self) -> &str {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:102         unsafe { str::from_c_str(self.raw.message as *const _) }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:103     }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:104 
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:105     fn detail(&self) -> Option<String> { Some(self.message()) }
                                                                                        ...
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100:1: 106:2 note: the type `libgit2-sys::git_error` must implement `core::kinds::Send` because it appears within the type `error::Error`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100 impl error::Error for Error {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:101     fn description(&self) -> &str {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:102         unsafe { str::from_c_str(self.raw.message as *const _) }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:103     }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:104 
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:105     fn detail(&self) -> Option<String> { Some(self.message()) }
                                                                                        ...
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100:1: 106:2 note: the trait `core::kinds::Send` must be implemented because it is required by `std::error::Error`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:100 impl error::Error for Error {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:101     fn description(&self) -> &str {
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:102         unsafe { str::from_c_str(self.raw.message as *const _) }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:103     }
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:104 
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.1.3/src/error.rs:105     fn detail(&self) -> Option<String> { Some(self.message()) }
                                                                                        ...
error: aborting due to previous error
Could not compile `git2`.

The error is actually reported against *mut c_char (c_char is u8 on aarch64) but it seemed to me that the note (i.e., "type libgit2-sys::git_error must implement core::kinds::Send because it appears within the type error::Error") is more relevant here.

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