Skip to content

Commit 43cb5b3

Browse files
committed
Auto merge of #1510 - gnzlbg:selfupdate, r=gnzlbg
Workaround Azure images not supporting rustup self update
2 parents 71e298f + 4233002 commit 43cb5b3

Some content is hidden

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

78 files changed

+7993
-5324
lines changed

ci/azure-install-rust.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ steps:
1717
- script: |
1818
@echo on
1919
if not defined TOOLCHAIN set TOOLCHAIN=nightly
20-
rustup update %TOOLCHAIN%-%TARGET%
20+
rustup update --no-self-update %TOOLCHAIN%-%TARGET%
2121
rustup default %TOOLCHAIN%-%TARGET%
2222
displayName: Install rust (windows)
2323
condition: eq( variables['Agent.OS'], 'Windows_NT' )

ci/style.rs

-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
//! * No trailing whitespace
1818
//! * No tabs
1919
//! * 80-character lines
20-
//! * `extern` instead of `extern "C"`
2120
//! * Specific module layout:
2221
//! 1. use directives
2322
//! 2. typedefs
@@ -126,9 +125,6 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
126125
if line.len() > 80 {
127126
err.error(path, i, "line longer than 80 chars");
128127
}
129-
if line.contains("extern \"C\"") {
130-
err.error(path, i, "use `extern` instead of `extern \"C\"");
131-
}
132128
if line.contains("#[cfg(") && !line.contains(" if ")
133129
&& !(line.contains("target_endian") ||
134130
line.contains("target_arch"))

src/cloudabi/mod.rs

+80-32
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,20 @@ pub const SOCK_STREAM: ::c_int = 130;
115115
pub enum FILE {}
116116
impl ::Copy for FILE {}
117117
impl ::Clone for FILE {
118-
fn clone(&self) -> FILE { *self }
118+
fn clone(&self) -> FILE {
119+
*self
120+
}
119121
}
120122
#[cfg_attr(feature = "extra_traits", derive(Debug))]
121123
pub enum fpos_t {} // TODO: fill this out with a struct
122124
impl ::Copy for fpos_t {}
123125
impl ::Clone for fpos_t {
124-
fn clone(&self) -> fpos_t { *self }
126+
fn clone(&self) -> fpos_t {
127+
*self
128+
}
125129
}
126130

127-
extern {
131+
extern "C" {
128132
pub fn isalnum(c: c_int) -> c_int;
129133
pub fn isalpha(c: c_int) -> c_int;
130134
pub fn iscntrl(c: c_int) -> c_int;
@@ -139,28 +143,44 @@ extern {
139143
pub fn tolower(c: c_int) -> c_int;
140144
pub fn toupper(c: c_int) -> c_int;
141145
pub fn fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE;
142-
pub fn freopen(filename: *const c_char, mode: *const c_char,
143-
file: *mut FILE) -> *mut FILE;
146+
pub fn freopen(
147+
filename: *const c_char,
148+
mode: *const c_char,
149+
file: *mut FILE,
150+
) -> *mut FILE;
144151
pub fn fflush(file: *mut FILE) -> c_int;
145152
pub fn fclose(file: *mut FILE) -> c_int;
146153
pub fn remove(filename: *const c_char) -> c_int;
147154
pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
148155
pub fn tmpfile() -> *mut FILE;
149-
pub fn setvbuf(stream: *mut FILE, buffer: *mut c_char, mode: c_int,
150-
size: size_t) -> c_int;
156+
pub fn setvbuf(
157+
stream: *mut FILE,
158+
buffer: *mut c_char,
159+
mode: c_int,
160+
size: size_t,
161+
) -> c_int;
151162
pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
152163
pub fn getchar() -> c_int;
153164
pub fn putchar(c: c_int) -> c_int;
154165
pub fn fgetc(stream: *mut FILE) -> c_int;
155-
pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
166+
pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE)
167+
-> *mut c_char;
156168
pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
157169
pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int;
158170
pub fn puts(s: *const c_char) -> c_int;
159171
pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
160-
pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t,
161-
stream: *mut FILE) -> size_t;
162-
pub fn fwrite(ptr: *const c_void, size: size_t, nobj: size_t,
163-
stream: *mut FILE) -> size_t;
172+
pub fn fread(
173+
ptr: *mut c_void,
174+
size: size_t,
175+
nobj: size_t,
176+
stream: *mut FILE,
177+
) -> size_t;
178+
pub fn fwrite(
179+
ptr: *const c_void,
180+
size: size_t,
181+
nobj: size_t,
182+
stream: *mut FILE,
183+
) -> size_t;
164184
pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
165185
pub fn ftell(stream: *mut FILE) -> c_long;
166186
pub fn rewind(stream: *mut FILE);
@@ -171,28 +191,44 @@ extern {
171191
pub fn perror(s: *const c_char);
172192
pub fn atoi(s: *const c_char) -> c_int;
173193
pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
174-
pub fn strtol(s: *const c_char, endp: *mut *mut c_char,
175-
base: c_int) -> c_long;
176-
pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
177-
base: c_int) -> c_ulong;
194+
pub fn strtol(
195+
s: *const c_char,
196+
endp: *mut *mut c_char,
197+
base: c_int,
198+
) -> c_long;
199+
pub fn strtoul(
200+
s: *const c_char,
201+
endp: *mut *mut c_char,
202+
base: c_int,
203+
) -> c_ulong;
178204
pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
179205
pub fn malloc(size: size_t) -> *mut c_void;
180206
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
181207
pub fn free(p: *mut c_void);
182208
pub fn abort() -> !;
183209
pub fn exit(status: c_int) -> !;
184210
pub fn _exit(status: c_int) -> !;
185-
pub fn atexit(cb: extern fn()) -> c_int;
211+
pub fn atexit(cb: extern "C" fn()) -> c_int;
186212
pub fn system(s: *const c_char) -> c_int;
187213
pub fn getenv(s: *const c_char) -> *mut c_char;
188-
pub fn getline (lineptr: *mut *mut c_char, n: *mut size_t,
189-
stream: *mut FILE) -> ssize_t;
214+
pub fn getline(
215+
lineptr: *mut *mut c_char,
216+
n: *mut size_t,
217+
stream: *mut FILE,
218+
) -> ssize_t;
190219

191220
pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
192-
pub fn strncpy(dst: *mut c_char, src: *const c_char,
193-
n: size_t) -> *mut c_char;
221+
pub fn strncpy(
222+
dst: *mut c_char,
223+
src: *const c_char,
224+
n: size_t,
225+
) -> *mut c_char;
194226
pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
195-
pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
227+
pub fn strncat(
228+
s: *mut c_char,
229+
ct: *const c_char,
230+
n: size_t,
231+
) -> *mut c_char;
196232
pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
197233
pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
198234
pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
@@ -204,23 +240,35 @@ extern {
204240
pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
205241
pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
206242
pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int;
207-
pub fn strncasecmp(s1: *const c_char, s2: *const c_char,
208-
n: size_t) -> c_int;
243+
pub fn strncasecmp(
244+
s1: *const c_char,
245+
s2: *const c_char,
246+
n: size_t,
247+
) -> c_int;
209248
pub fn strlen(cs: *const c_char) -> size_t;
210249
pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
211250
pub fn strerror(n: c_int) -> *mut c_char;
212251
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
213252
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
214253
pub fn wcslen(buf: *const wchar_t) -> size_t;
215-
pub fn wcstombs(dest: *mut c_char, src: *const wchar_t,
216-
n: size_t) -> ::size_t;
254+
pub fn wcstombs(
255+
dest: *mut c_char,
256+
src: *const wchar_t,
257+
n: size_t,
258+
) -> ::size_t;
217259

218260
pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
219261
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
220-
pub fn memcpy(dest: *mut c_void, src: *const c_void,
221-
n: size_t) -> *mut c_void;
222-
pub fn memmove(dest: *mut c_void, src: *const c_void,
223-
n: size_t) -> *mut c_void;
262+
pub fn memcpy(
263+
dest: *mut c_void,
264+
src: *const c_void,
265+
n: size_t,
266+
) -> *mut c_void;
267+
pub fn memmove(
268+
dest: *mut c_void,
269+
src: *const c_void,
270+
n: size_t,
271+
) -> *mut c_void;
224272
pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
225273

226274
pub fn abs(i: c_int) -> c_int;
@@ -259,7 +307,7 @@ extern {
259307
pub fn pthread_create(
260308
native: *mut ::pthread_t,
261309
attr: *const ::pthread_attr_t,
262-
f: extern fn(*mut ::c_void) -> *mut ::c_void,
310+
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
263311
value: *mut ::c_void,
264312
) -> ::c_int;
265313
pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
@@ -270,7 +318,7 @@ extern {
270318
) -> ::c_int;
271319
pub fn pthread_key_create(
272320
key: *mut pthread_key_t,
273-
dtor: ::Option<unsafe extern fn(*mut ::c_void)>,
321+
dtor: ::Option<unsafe extern "C" fn(*mut ::c_void)>,
274322
) -> ::c_int;
275323
pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
276324
pub fn pthread_setspecific(

src/fixed_width_ints.rs

+8-32
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,19 @@
22
//!
33
//! These aliases are deprecated: use the Rust types instead.
44
5-
#[deprecated(
6-
since = "0.2.55",
7-
note = "Use i8 instead."
8-
)]
5+
#[deprecated(since = "0.2.55", note = "Use i8 instead.")]
96
pub type int8_t = i8;
10-
#[deprecated(
11-
since = "0.2.55",
12-
note = "Use i16 instead."
13-
)]
7+
#[deprecated(since = "0.2.55", note = "Use i16 instead.")]
148
pub type int16_t = i16;
15-
#[deprecated(
16-
since = "0.2.55",
17-
note = "Use i32 instead."
18-
)]
9+
#[deprecated(since = "0.2.55", note = "Use i32 instead.")]
1910
pub type int32_t = i32;
20-
#[deprecated(
21-
since = "0.2.55",
22-
note = "Use i64 instead."
23-
)]
11+
#[deprecated(since = "0.2.55", note = "Use i64 instead.")]
2412
pub type int64_t = i64;
25-
#[deprecated(
26-
since = "0.2.55",
27-
note = "Use u8 instead."
28-
)]
13+
#[deprecated(since = "0.2.55", note = "Use u8 instead.")]
2914
pub type uint8_t = u8;
30-
#[deprecated(
31-
since = "0.2.55",
32-
note = "Use u16 instead."
33-
)]
15+
#[deprecated(since = "0.2.55", note = "Use u16 instead.")]
3416
pub type uint16_t = u16;
35-
#[deprecated(
36-
since = "0.2.55",
37-
note = "Use u32 instead."
38-
)]
17+
#[deprecated(since = "0.2.55", note = "Use u32 instead.")]
3918
pub type uint32_t = u32;
40-
#[deprecated(
41-
since = "0.2.55",
42-
note = "Use u64 instead."
43-
)]
19+
#[deprecated(since = "0.2.55", note = "Use u64 instead.")]
4420
pub type uint64_t = u64;

src/fuchsia/align.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,5 @@ macro_rules! expand_align {
138138
}
139139
}
140140
}
141-
}
141+
};
142142
}

0 commit comments

Comments
 (0)