Skip to content

Commit 6f3550a

Browse files
committed
Patch up foreign-fn-linkname.rs
1 parent 7c274a3 commit 6f3550a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Diff for: tests/ui/foreign/foreign-fn-linkname.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
//@ run-pass
22
//@ ignore-sgx no libc
33

4-
// Ensure no false positive on "unused extern crate" lint
5-
#![deny(unused_extern_crates)]
6-
7-
#![feature(rustc_private)]
8-
9-
extern crate libc;
104
use std::ffi::CString;
115

126
mod mlibc {
13-
use libc::{c_char, size_t};
7+
use std::ffi::c_char;
148

159
extern "C" {
1610
#[link_name = "strlen"]
17-
pub fn my_strlen(str: *const c_char) -> size_t;
11+
pub fn my_strlen(str: *const c_char) -> usize;
1812
}
1913
}
2014

Diff for: tests/ui/foreign/foreign2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod zed {
1515
#[cfg(not(windows))]
1616
mod mlibc {
1717
extern crate libc;
18-
use libc::{c_int, c_void, size_t, ssize_t};
18+
use self::libc::{c_int, c_void, size_t, ssize_t};
1919

2020
extern "C" {
2121
pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t;

0 commit comments

Comments
 (0)