Skip to content

Commit 030b3a2

Browse files
committed
windows: Allow snake_case errors for now.
1 parent 09fc340 commit 030b3a2

File tree

15 files changed

+22
-6
lines changed

15 files changed

+22
-6
lines changed

src/doc/guide-ffi.md

+1
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ extern crate libc;
476476
477477
#[cfg(target_os = "win32", target_arch = "x86")]
478478
#[link(name = "kernel32")]
479+
#[allow(non_snake_case_functions)]
479480
extern "stdcall" {
480481
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int;
481482
}

src/liblibc/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -71,6 +71,7 @@
7171
*/
7272

7373
#![allow(non_camel_case_types)]
74+
#![allow(non_snake_case_functions)]
7475
#![allow(non_uppercase_statics)]
7576
#![allow(missing_doc)]
7677
#![allow(uppercase_variables)]

src/libnative/io/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -21,6 +21,8 @@
2121
//! play. The only dependencies of these modules are the normal system libraries
2222
//! that you would find on the respective platform.
2323
24+
#![allow(non_snake_case_functions)]
25+
2426
use libc::c_int;
2527
use libc;
2628
use std::c_str::CString;

src/librustdoc/flock.rs

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ mod imp {
141141

142142
static LOCKFILE_EXCLUSIVE_LOCK: libc::DWORD = 0x00000002;
143143

144+
#[allow(non_snake_case_functions)]
144145
extern "system" {
145146
fn LockFileEx(hFile: libc::HANDLE,
146147
dwFlags: libc::DWORD,

src/libstd/os.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -27,6 +27,7 @@
2727
*/
2828

2929
#![allow(missing_doc)]
30+
#![allow(non_snake_case_functions)]
3031

3132
use clone::Clone;
3233
use container::Container;

src/libstd/rand/os.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -93,6 +93,7 @@ mod imp {
9393
static CRYPT_VERIFYCONTEXT: DWORD = 0xF0000000;
9494
static NTE_BAD_SIGNATURE: DWORD = 0x80090006;
9595

96+
#[allow(non_snake_case_functions)]
9697
extern "system" {
9798
fn CryptAcquireContextA(phProv: *mut HCRYPTPROV,
9899
pszContainer: LPCSTR,

src/libstd/rt/backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ mod imp {
518518
use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
519519
use slice::ImmutableVector;
520520

521+
#[allow(non_snake_case_functions)]
521522
extern "system" {
522523
fn GetCurrentProcess() -> libc::HANDLE;
523524
fn GetCurrentThread() -> libc::HANDLE;

src/libstd/rt/libunwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//! Unwind library interface
1212
1313
#![allow(non_camel_case_types)]
14+
#![allow(non_snake_case_functions)]
1415
#![allow(dead_code)] // these are just bindings
1516

1617
use libc;

src/libstd/rt/thread.rs

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ mod imp {
199199
SwitchToThread();
200200
}
201201

202+
#[allow(non_snake_case_functions)]
202203
extern "system" {
203204
fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES,
204205
dwStackSize: SIZE_T,

src/libstd/rt/thread_local_storage.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -86,6 +86,7 @@ pub unsafe fn destroy(key: Key) {
8686
}
8787

8888
#[cfg(windows)]
89+
#[allow(non_snake_case_functions)]
8990
extern "system" {
9091
fn TlsAlloc() -> DWORD;
9192
fn TlsFree(dwTlsIndex: DWORD) -> BOOL;

src/libstd/unstable/dynamic_lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -317,6 +317,7 @@ pub mod dl {
317317
FreeLibrary(handle as *libc::c_void); ()
318318
}
319319

320+
#[allow(non_snake_case_functions)]
320321
extern "system" {
321322
fn SetLastError(error: libc::size_t);
322323
fn LoadLibraryW(name: *libc::c_void) -> *libc::c_void;

src/libstd/unstable/mutex.rs

+1
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ mod imp {
543543
libc::CloseHandle(block);
544544
}
545545

546+
#[allow(non_snake_case_functions)]
546547
extern "system" {
547548
fn CreateEventA(lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
548549
bManualReset: BOOL,

src/libterm/win.rs

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct WinConsole<T> {
2727
background: color::Color,
2828
}
2929

30+
#[allow(non_snake_case_functions)]
3031
#[link(name = "kernel32")]
3132
extern "system" {
3233
fn SetConsoleTextAttribute(handle: libc::HANDLE, attr: libc::WORD) -> libc::BOOL;

src/test/bench/shootout-spectralnorm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(phase)]
12+
#![allow(non_snake_case_functions)]
1213
#[phase(syntax)] extern crate green;
1314
extern crate sync;
1415

src/test/bench/sudoku.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ignore-pretty very bad with line comments
1212

1313
#![feature(managed_boxes)]
14+
#![allow(non_snake_case_functions)]
1415

1516
use std::io;
1617
use std::io::stdio::StdReader;

0 commit comments

Comments
 (0)