Skip to content

Remove pub extern and priv extern from the language #7896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libextra/dbg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod rustrt {
use std::unstable::intrinsics::{TyDesc};

#[abi = "cdecl"]
pub extern {
extern {
pub unsafe fn debug_tydesc(td: *TyDesc);
pub unsafe fn debug_opaque(td: *TyDesc, x: *());
pub unsafe fn debug_box(td: *TyDesc, x: *());
Expand Down
22 changes: 11 additions & 11 deletions src/libextra/flate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ pub mod rustrt {
use std::libc::{c_int, c_void, size_t};

#[link_name = "rustrt"]
pub extern {
unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
extern {
pub unsafe fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;

unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
pub unsafe fn tinfl_decompress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
pout_len: *mut size_t,
flags: c_int)
-> *c_void;
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/libextra/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ pub mod rustrt {
use std::libc;

#[nolink]
pub extern {
unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
-> *libc::c_void;
unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
extern {
pub unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
-> *libc::c_void;
pub unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
pub unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libextra/rl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::str;
pub mod rustrt {
use std::libc::{c_char, c_int};

pub extern {
extern {
pub unsafe fn linenoise(prompt: *c_char) -> *c_char;
pub unsafe fn linenoiseHistoryAdd(line: *c_char) -> c_int;
pub unsafe fn linenoiseHistorySetMaxLen(len: c_int) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion src/libextra/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub mod rustrt {
use super::Tm;

#[abi = "cdecl"]
pub extern {
extern {
pub unsafe fn get_time(sec: &mut i64, nsec: &mut i32);

pub unsafe fn precise_time_ns(ns: &mut u64);
Expand Down
18 changes: 9 additions & 9 deletions src/libextra/unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ pub mod icu {
pub mod libicu {
#[link_name = "icuuc"]
#[abi = "cdecl"]
pub extern {
unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty)
-> UBool;
unsafe fn u_isdigit(c: UChar32) -> UBool;
unsafe fn u_islower(c: UChar32) -> UBool;
unsafe fn u_isspace(c: UChar32) -> UBool;
unsafe fn u_isupper(c: UChar32) -> UBool;
unsafe fn u_tolower(c: UChar32) -> UChar32;
unsafe fn u_toupper(c: UChar32) -> UChar32;
extern {
pub unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty)
-> UBool;
pub unsafe fn u_isdigit(c: UChar32) -> UBool;
pub unsafe fn u_islower(c: UChar32) -> UBool;
pub unsafe fn u_isspace(c: UChar32) -> UBool;
pub unsafe fn u_isupper(c: UChar32) -> UBool;
pub unsafe fn u_tolower(c: UChar32) -> UChar32;
pub unsafe fn u_toupper(c: UChar32) -> UChar32;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lib/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pub mod llvm {
#[link_args = "-Lrustllvm -lrustllvm"]
#[link_name = "rustllvm"]
#[abi = "cdecl"]
pub extern {
extern {
/* Create and destroy contexts. */
#[fast_ffi]
pub unsafe fn LLVMContextCreate() -> ContextRef;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub mod rustrt {
use libc::c_void;

#[link_name = "rustrt"]
pub extern {
extern {
#[rust_stack]
// FIXME (#4386): Unable to make following method private.
pub unsafe fn rust_get_task() -> *c_void;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub mod rustrt {
use super::StackSegment;

#[link_name = "rustrt"]
pub extern {
extern {
#[rust_stack]
pub unsafe fn rust_gc_metadata() -> *Word;

Expand Down
8 changes: 4 additions & 4 deletions src/libstd/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ pub mod rustrt {

#[abi = "cdecl"]
#[link_name = "rustrt"]
pub extern {
unsafe fn rust_get_stdin() -> *libc::FILE;
unsafe fn rust_get_stdout() -> *libc::FILE;
unsafe fn rust_get_stderr() -> *libc::FILE;
extern {
pub unsafe fn rust_get_stdin() -> *libc::FILE;
pub unsafe fn rust_get_stdout() -> *libc::FILE;
pub unsafe fn rust_get_stderr() -> *libc::FILE;
}
}

Expand Down
Loading