Skip to content

Commit d638f86

Browse files
committed
Add some now-necesssary #[repr] on enums
This was broken in rust-lang/rust#15234.
1 parent b3d9e98 commit d638f86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ssl/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ impl SslMethod {
7070
}
7171

7272
/// Determines the type of certificate verification used
73+
#[repr(i32)]
7374
pub enum SslVerifyMode {
7475
/// Verify that the server's certificate is trusted
7576
SslVerifyPeer = ffi::SSL_VERIFY_PEER,
@@ -212,6 +213,7 @@ pub struct X509Name<'x> {
212213
name: *mut ffi::X509_NAME
213214
}
214215

216+
#[repr(u64)]
215217
pub enum X509NameFormat {
216218
Rfc2253 = ffi::XN_FLAG_RFC2253,
217219
Oneline = ffi::XN_FLAG_ONELINE,
@@ -370,6 +372,7 @@ impl Ssl {
370372
}
371373

372374
#[deriving(FromPrimitive)]
375+
#[repr(i32)]
373376
enum LibSslError {
374377
ErrorNone = ffi::SSL_ERROR_NONE,
375378
ErrorSsl = ffi::SSL_ERROR_SSL,

0 commit comments

Comments
 (0)