Skip to content

Commit

Permalink
windows: Allow snake_case errors for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryman committed May 30, 2014
1 parent 09fc340 commit 030b3a2
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/doc/guide-ffi.md
Expand Up @@ -476,6 +476,7 @@ extern crate libc;
#[cfg(target_os = "win32", target_arch = "x86")]
#[link(name = "kernel32")]
#[allow(non_snake_case_functions)]
extern "stdcall" {
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int;
}
Expand Down
3 changes: 2 additions & 1 deletion src/liblibc/lib.rs
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -71,6 +71,7 @@
*/

#![allow(non_camel_case_types)]
#![allow(non_snake_case_functions)]
#![allow(non_uppercase_statics)]
#![allow(missing_doc)]
#![allow(uppercase_variables)]
Expand Down
4 changes: 3 additions & 1 deletion src/libnative/io/mod.rs
@@ -1,4 +1,4 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -21,6 +21,8 @@
//! play. The only dependencies of these modules are the normal system libraries
//! that you would find on the respective platform.

#![allow(non_snake_case_functions)]

use libc::c_int;
use libc;
use std::c_str::CString;
Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/flock.rs
Expand Up @@ -141,6 +141,7 @@ mod imp {

static LOCKFILE_EXCLUSIVE_LOCK: libc::DWORD = 0x00000002;

#[allow(non_snake_case_functions)]
extern "system" {
fn LockFileEx(hFile: libc::HANDLE,
dwFlags: libc::DWORD,
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/os.rs
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -27,6 +27,7 @@
*/

#![allow(missing_doc)]
#![allow(non_snake_case_functions)]

use clone::Clone;
use container::Container;
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/rand/os.rs
@@ -1,4 +1,4 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -93,6 +93,7 @@ mod imp {
static CRYPT_VERIFYCONTEXT: DWORD = 0xF0000000;
static NTE_BAD_SIGNATURE: DWORD = 0x80090006;

#[allow(non_snake_case_functions)]
extern "system" {
fn CryptAcquireContextA(phProv: *mut HCRYPTPROV,
pszContainer: LPCSTR,
Expand Down
1 change: 1 addition & 0 deletions src/libstd/rt/backtrace.rs
Expand Up @@ -518,6 +518,7 @@ mod imp {
use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT};
use slice::ImmutableVector;

#[allow(non_snake_case_functions)]
extern "system" {
fn GetCurrentProcess() -> libc::HANDLE;
fn GetCurrentThread() -> libc::HANDLE;
Expand Down
1 change: 1 addition & 0 deletions src/libstd/rt/libunwind.rs
Expand Up @@ -11,6 +11,7 @@
//! Unwind library interface

#![allow(non_camel_case_types)]
#![allow(non_snake_case_functions)]
#![allow(dead_code)] // these are just bindings

use libc;
Expand Down
1 change: 1 addition & 0 deletions src/libstd/rt/thread.rs
Expand Up @@ -199,6 +199,7 @@ mod imp {
SwitchToThread();
}

#[allow(non_snake_case_functions)]
extern "system" {
fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES,
dwStackSize: SIZE_T,
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/rt/thread_local_storage.rs
@@ -1,4 +1,4 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -86,6 +86,7 @@ pub unsafe fn destroy(key: Key) {
}

#[cfg(windows)]
#[allow(non_snake_case_functions)]
extern "system" {
fn TlsAlloc() -> DWORD;
fn TlsFree(dwTlsIndex: DWORD) -> BOOL;
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/unstable/dynamic_lib.rs
@@ -1,4 +1,4 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -317,6 +317,7 @@ pub mod dl {
FreeLibrary(handle as *libc::c_void); ()
}

#[allow(non_snake_case_functions)]
extern "system" {
fn SetLastError(error: libc::size_t);
fn LoadLibraryW(name: *libc::c_void) -> *libc::c_void;
Expand Down
1 change: 1 addition & 0 deletions src/libstd/unstable/mutex.rs
Expand Up @@ -543,6 +543,7 @@ mod imp {
libc::CloseHandle(block);
}

#[allow(non_snake_case_functions)]
extern "system" {
fn CreateEventA(lpSecurityAttributes: LPSECURITY_ATTRIBUTES,
bManualReset: BOOL,
Expand Down
1 change: 1 addition & 0 deletions src/libterm/win.rs
Expand Up @@ -27,6 +27,7 @@ pub struct WinConsole<T> {
background: color::Color,
}

#[allow(non_snake_case_functions)]
#[link(name = "kernel32")]
extern "system" {
fn SetConsoleTextAttribute(handle: libc::HANDLE, attr: libc::WORD) -> libc::BOOL;
Expand Down
1 change: 1 addition & 0 deletions src/test/bench/shootout-spectralnorm.rs
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

#![feature(phase)]
#![allow(non_snake_case_functions)]
#[phase(syntax)] extern crate green;
extern crate sync;

Expand Down
1 change: 1 addition & 0 deletions src/test/bench/sudoku.rs
Expand Up @@ -11,6 +11,7 @@
// ignore-pretty very bad with line comments

#![feature(managed_boxes)]
#![allow(non_snake_case_functions)]

use std::io;
use std::io::stdio::StdReader;
Expand Down

5 comments on commit 030b3a2

@bors
Copy link
Contributor

@bors bors commented on 030b3a2 May 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at Ryman@030b3a2

@bors
Copy link
Contributor

@bors bors commented on 030b3a2 May 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging Ryman/rust/SnakeCaseLint = 030b3a2 into auto

@bors
Copy link
Contributor

@bors bors commented on 030b3a2 May 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ryman/rust/SnakeCaseLint = 030b3a2 merged ok, testing candidate = 24e489f

@bors
Copy link
Contributor

@bors bors commented on 030b3a2 May 30, 2014

@bors
Copy link
Contributor

@bors bors commented on 030b3a2 May 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 24e489f

Please sign in to comment.