Skip to content

Commit 5895274

Browse files
author
bors-servo
authored
Auto merge of #107 - rthomas:106-warnings, r=jdm
Remove zero-sized struct warning. #106. This change will fix the remaining warnings in servo/core-text-rs#62 when it is released and the core-text crate is updated. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-foundation-rs/107) <!-- Reviewable:end -->
2 parents 4c380a6 + a37ecf5 commit 5895274

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

core-foundation-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "core-foundation-sys"
33
description = "Bindings to Core Foundation for OS X"
44
homepage = "https://github.com/servo/core-foundation-rs"
55
repository = "https://github.com/servo/core-foundation-rs"
6-
version = "0.4.1"
6+
version = "0.4.2"
77
authors = ["The Servo Project Developers"]
88
license = "MIT / Apache-2.0"
99
build = "build.rs"

core-foundation-sys/src/number.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ pub static kCFNumberFloat64Type: CFNumberType = 6;
3737
// static kCFNumberCGFloatType: CFNumberType = 16;
3838
// static kCFNumberMaxType: CFNumberType = 16;
3939

40-
#[repr(C)]
41-
pub struct __CFNumber;
40+
// This is an enum due to zero-sized types warnings.
41+
// For more details see https://github.com/rust-lang/rust/issues/27303
42+
pub enum __CFNumber {}
4243

4344
pub type CFNumberRef = *const __CFNumber;
4445

core-foundation/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name = "core-foundation"
33
description = "Bindings to Core Foundation for OS X"
44
homepage = "https://github.com/servo/core-foundation-rs"
55
repository = "https://github.com/servo/core-foundation-rs"
6-
version = "0.4.1"
6+
version = "0.4.2"
77
authors = ["The Servo Project Developers"]
88
license = "MIT / Apache-2.0"
99

1010
[dependencies.core-foundation-sys]
1111
path = "../core-foundation-sys"
12-
version = "0.4.0"
12+
version = "0.4.2"
1313

1414
[dependencies]
1515
libc = "0.2"

core-foundation/src/runloop.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ mod test {
125125

126126

127127
let run_loop_timer = CFRunLoopTimer::new(now + 0.20f64, 0f64, 0, 0, timer_popped, &mut context);
128-
run_loop.add_timer(&run_loop_timer, kCFRunLoopDefaultMode);
129-
128+
unsafe {
129+
run_loop.add_timer(&run_loop_timer, kCFRunLoopDefaultMode);
130+
}
130131
CFRunLoop::run_current();
131132
}
132133

0 commit comments

Comments
 (0)