Skip to content

Commit 58972ae

Browse files
Update to 2018 edition. (#642)
This is the minimum fix required. It updates to use crate-relative imports.
1 parent eb41f50 commit 58972ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+485
-452
lines changed

cocoa-foundation/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/servo/core-foundation-rs"
77
version = "0.1.2"
88
authors = ["The Servo Project Developers"]
99
license = "MIT OR Apache-2.0"
10+
edition = "2018"
1011

1112
[package.metadata.docs.rs]
1213
default-target = "x86_64-apple-darwin"

cocoa-foundation/src/foundation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#![allow(non_upper_case_globals)]
1111

12-
use base::{id, nil, BOOL, NO, SEL};
12+
use crate::base::{id, nil, BOOL, NO, SEL};
1313
use block::Block;
1414
use libc;
1515
use std::os::raw::c_void;
@@ -32,7 +32,7 @@ const UTF8_ENCODING: usize = 4;
3232

3333
#[cfg(target_os = "macos")]
3434
mod macos {
35-
use base::id;
35+
use crate::base::id;
3636
use core_graphics_types::base::CGFloat;
3737
use core_graphics_types::geometry::CGRect;
3838
use objc;

cocoa/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repository = "https://github.com/servo/core-foundation-rs"
77
version = "0.25.0"
88
authors = ["The Servo Project Developers"]
99
license = "MIT OR Apache-2.0"
10+
edition = "2018"
1011

1112
[package.metadata.docs.rs]
1213
default-target = "x86_64-apple-darwin"

cocoa/src/appkit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
#![allow(non_upper_case_globals)]
1111

12-
use base::{id, BOOL, SEL};
13-
use block::Block;
14-
use foundation::{
12+
use crate::base::{id, BOOL, SEL};
13+
use crate::foundation::{
1514
NSInteger, NSPoint, NSRange, NSRect, NSRectEdge, NSSize, NSTimeInterval, NSUInteger,
1615
};
16+
use block::Block;
1717
use libc;
1818

1919
pub use core_graphics::base::CGFloat;

cocoa/src/quartzcore.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use foreign_types::ForeignType;
2424
use std::ops::Mul;
2525
use std::ptr;
2626

27-
use appkit::CGLContextObj;
28-
use base::{id, nil, BOOL, YES};
29-
use foundation::NSUInteger;
27+
use crate::appkit::CGLContextObj;
28+
use crate::base::{id, nil, BOOL, YES};
29+
use crate::foundation::NSUInteger;
3030

3131
// CABase.h
3232

@@ -1356,7 +1356,7 @@ pub mod transaction {
13561356
use core_foundation::date::CFTimeInterval;
13571357
use core_foundation::string::CFString;
13581358

1359-
use base::{id, BOOL, YES};
1359+
use crate::base::{id, BOOL, YES};
13601360

13611361
#[inline]
13621362
pub fn begin() {

core-foundation-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repository = "https://github.com/servo/core-foundation-rs"
66
version = "0.8.6"
77
authors = ["The Servo Project Developers"]
88
license = "MIT OR Apache-2.0"
9+
edition = "2018"
910

1011
[dependencies]
1112

core-foundation-sys/src/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFComparatorFunction, CFIndex, CFRange, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFComparatorFunction, CFIndex, CFRange, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
pub type CFArrayRetainCallBack =
1616
extern "C" fn(allocator: CFAllocatorRef, value: *const c_void) -> *const c_void;

core-foundation-sys/src/attributed_string.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, CFTypeRef};
11-
use dictionary::CFDictionaryRef;
10+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, CFTypeRef};
11+
use crate::dictionary::CFDictionaryRef;
12+
use crate::string::CFMutableStringRef;
13+
use crate::string::CFStringRef;
1214
use std::os::raw::c_void;
13-
use string::CFMutableStringRef;
14-
use string::CFStringRef;
1515

1616
#[repr(C)]
1717
pub struct __CFAttributedString(c_void);

core-foundation-sys/src/bag.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
#[repr(C)]
1616
pub struct __CFBag(c_void);

core-foundation-sys/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10+
use crate::string::CFStringRef;
1011
use std::cmp::Ordering;
1112
use std::os::raw::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void};
12-
use string::CFStringRef;
1313

1414
pub type Boolean = u8;
1515
pub type mach_port_t = c_uint;

core-foundation-sys/src/binary_heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFComparisonResult, CFIndex, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFComparisonResult, CFIndex, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
#[repr(C)]
1616
pub struct __CFBinaryHeap(c_void);

core-foundation-sys/src/bit_vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, UInt32, UInt8};
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, UInt32, UInt8};
1313

1414
#[repr(C)]
1515
pub struct __CFBitVector(c_void);

core-foundation-sys/src/bundle.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
use std::os::raw::c_void;
1111

12-
use array::CFArrayRef;
12+
use crate::array::CFArrayRef;
1313
#[cfg(target_os = "macos")]
14-
use base::SInt32;
15-
use base::{Boolean, CFAllocatorRef, CFTypeID, CFTypeRef, UInt32};
16-
use dictionary::CFDictionaryRef;
17-
use error::CFErrorRef;
14+
use crate::base::SInt32;
15+
use crate::base::{Boolean, CFAllocatorRef, CFTypeID, CFTypeRef, UInt32};
16+
use crate::dictionary::CFDictionaryRef;
17+
use crate::error::CFErrorRef;
18+
use crate::string::CFStringRef;
19+
use crate::url::CFURLRef;
1820
use std::os::raw::{c_int, c_uint};
19-
use string::CFStringRef;
20-
use url::CFURLRef;
2121

2222
#[repr(C)]
2323
pub struct __CFBundle(c_void);

core-foundation-sys/src/calendar.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
use std::os::raw::{c_char, c_void};
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID};
13-
use date::{CFAbsoluteTime, CFTimeInterval};
14-
use locale::{CFCalendarIdentifier, CFLocaleRef};
15-
use timezone::CFTimeZoneRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID};
13+
use crate::date::{CFAbsoluteTime, CFTimeInterval};
14+
use crate::locale::{CFCalendarIdentifier, CFLocaleRef};
15+
use crate::timezone::CFTimeZoneRef;
1616

1717
#[repr(C)]
1818
pub struct __CFCalendar(c_void);

core-foundation-sys/src/characterset.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, UTF32Char};
11-
use data::CFDataRef;
10+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFRange, CFTypeID, UTF32Char};
11+
use crate::data::CFDataRef;
12+
use crate::string::{CFStringRef, UniChar};
1213
use std::os::raw::c_void;
13-
use string::{CFStringRef, UniChar};
1414

1515
pub type CFCharacterSetPredefinedSet = CFIndex;
1616

core-foundation-sys/src/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use base::{CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID};
10+
use crate::base::{CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID};
1111
use std::os::raw::c_void;
1212

1313
#[repr(C)]

core-foundation-sys/src/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{CFAllocatorRef, CFComparisonResult, CFTypeID};
12+
use crate::base::{CFAllocatorRef, CFComparisonResult, CFTypeID};
1313

1414
#[repr(C)]
1515
pub struct __CFDate(c_void);

core-foundation-sys/src/date_formatter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID, CFTypeRef};
13-
use date::{CFAbsoluteTime, CFDateRef};
14-
use locale::CFLocaleRef;
15-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID, CFTypeRef};
13+
use crate::date::{CFAbsoluteTime, CFDateRef};
14+
use crate::locale::CFLocaleRef;
15+
use crate::string::CFStringRef;
1616

1717
#[repr(C)]
1818
pub struct __CFDateFormatter(c_void);

core-foundation-sys/src/dictionary.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFHashCode, CFIndex, CFTypeID};
13+
use crate::string::CFStringRef;
1414

1515
pub type CFDictionaryApplierFunction =
1616
extern "C" fn(key: *const c_void, value: *const c_void, context: *mut c_void);

core-foundation-sys/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{CFAllocatorRef, CFIndex, CFTypeID};
13-
use dictionary::CFDictionaryRef;
14-
use string::CFStringRef;
12+
use crate::base::{CFAllocatorRef, CFIndex, CFTypeID};
13+
use crate::dictionary::CFDictionaryRef;
14+
use crate::string::CFStringRef;
1515

1616
#[repr(C)]
1717
pub struct __CFError(c_void);

core-foundation-sys/src/file_security.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use std::os::raw::c_void;
1111

1212
#[cfg(feature = "mac_os_10_8_features")]
13-
use base::CFOptionFlags;
14-
use base::{Boolean, CFAllocatorRef, CFTypeID};
15-
use uuid::CFUUIDRef;
13+
use crate::base::CFOptionFlags;
14+
use crate::base::{Boolean, CFAllocatorRef, CFTypeID};
15+
use crate::uuid::CFUUIDRef;
1616

1717
#[repr(C)]
1818
pub struct __CFFileSecurity(c_void);

core-foundation-sys/src/filedescriptor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
use std::os::raw::{c_int, c_void};
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFTypeID};
13-
use runloop::CFRunLoopSourceRef;
14-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFTypeID};
13+
use crate::runloop::CFRunLoopSourceRef;
14+
use crate::string::CFStringRef;
1515

1616
pub type CFFileDescriptorNativeDescriptor = c_int;
1717

core-foundation-sys/src/locale.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use array::CFArrayRef;
11-
use base::{CFAllocatorRef, CFIndex, CFTypeID, CFTypeRef, LangCode, RegionCode};
12-
use dictionary::CFDictionaryRef;
13-
use notification_center::CFNotificationName;
10+
use crate::array::CFArrayRef;
11+
use crate::base::{CFAllocatorRef, CFIndex, CFTypeID, CFTypeRef, LangCode, RegionCode};
12+
use crate::dictionary::CFDictionaryRef;
13+
use crate::notification_center::CFNotificationName;
14+
use crate::string::CFStringRef;
1415
use std::os::raw::c_void;
15-
use string::CFStringRef;
1616

1717
#[repr(C)]
1818
pub struct __CFLocale(c_void);

core-foundation-sys/src/mach_port.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
use base::{mach_port_t, Boolean};
11-
pub use base::{CFAllocatorRef, CFIndex, CFTypeID};
12-
use runloop::CFRunLoopSourceRef;
10+
use crate::base::{mach_port_t, Boolean};
11+
pub use crate::base::{CFAllocatorRef, CFIndex, CFTypeID};
12+
use crate::runloop::CFRunLoopSourceRef;
13+
use crate::string::CFStringRef;
1314
use std::os::raw::c_void;
14-
use string::CFStringRef;
1515

1616
#[repr(C)]
1717
pub struct __CFMachPort(c_void);

core-foundation-sys/src/messageport.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFTypeID, SInt32};
13-
use data::CFDataRef;
14-
use date::CFTimeInterval;
15-
use runloop::CFRunLoopSourceRef;
16-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFTypeID, SInt32};
13+
use crate::data::CFDataRef;
14+
use crate::date::CFTimeInterval;
15+
use crate::runloop::CFRunLoopSourceRef;
16+
use crate::string::CFStringRef;
1717

1818
#[repr(C)]
1919
#[derive(Copy, Clone, Debug)]

core-foundation-sys/src/notification_center.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFIndex, CFOptionFlags, CFTypeID};
13-
use dictionary::CFDictionaryRef;
14-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFIndex, CFOptionFlags, CFTypeID};
13+
use crate::dictionary::CFDictionaryRef;
14+
use crate::string::CFStringRef;
1515

1616
#[repr(C)]
1717
pub struct __CFNotificationCenter(c_void);

core-foundation-sys/src/number.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{Boolean, CFAllocatorRef, CFComparisonResult, CFIndex, CFTypeID};
12+
use crate::base::{Boolean, CFAllocatorRef, CFComparisonResult, CFIndex, CFTypeID};
1313

1414
#[repr(C)]
1515
pub struct __CFBoolean(c_void);

core-foundation-sys/src/number_formatter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
use std::os::raw::{c_double, c_void};
1111

12-
use base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID, CFTypeRef};
13-
use locale::CFLocaleRef;
14-
use number::{CFNumberRef, CFNumberType};
15-
use string::CFStringRef;
12+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID, CFTypeRef};
13+
use crate::locale::CFLocaleRef;
14+
use crate::number::{CFNumberRef, CFNumberType};
15+
use crate::string::CFStringRef;
1616

1717
#[repr(C)]
1818
pub struct __CFNumberFormatter(c_void);

core-foundation-sys/src/plugin.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
use std::os::raw::c_void;
1111

12-
use array::CFArrayRef;
13-
use base::{Boolean, CFAllocatorRef, CFIndex, CFTypeID};
14-
use bundle::{CFBundleRef, CFPlugInRef};
15-
use string::CFStringRef;
16-
use url::CFURLRef;
17-
use uuid::CFUUIDRef;
12+
use crate::array::CFArrayRef;
13+
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFTypeID};
14+
use crate::bundle::{CFBundleRef, CFPlugInRef};
15+
use crate::string::CFStringRef;
16+
use crate::url::CFURLRef;
17+
use crate::uuid::CFUUIDRef;
1818

1919
#[repr(C)]
2020
pub struct __CFPlugInInstance(c_void);

0 commit comments

Comments
 (0)