Browse Source

Tweak some style here and there

add-rc-path
Alex Crichton 10 years ago
parent
commit
a7bcbe58c6
  1. 8
      gcc-test/build.rs
  2. 7
      gcc-test/tests/all.rs
  3. 1
      src/lib.rs

8
gcc-test/build.rs

@ -70,7 +70,9 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
}
// This tests whether we can build a library but not link it to the main crate.
// The test module will do its own linking.
gcc::Config::new().cargo_metadata(false).file("src/opt_linkage.c").compile("libOptLinkage.a");
// This tests whether we can build a library but not link it to the main
// crate. The test module will do its own linking.
gcc::Config::new().cargo_metadata(false)
.file("src/opt_linkage.c")
.compile("libOptLinkage.a");
}

7
gcc-test/tests/all.rs

@ -2,9 +2,6 @@ extern crate gcc_test;
use gcc_test::*;
// This will cause a link failure if the archive is already
// linked against the gcc_test crate.
#[link(name = "OptLinkage", kind = "static")]
extern {
fn answer() -> i32;
@ -57,5 +54,7 @@ fn msvc_here() {
#[test]
fn opt_linkage() {
unsafe { assert_eq!(answer(),42); }
unsafe {
assert_eq!(answer(), 42);
}
}

1
src/lib.rs

@ -332,7 +332,6 @@ impl Config {
if let Some(stdlib) = self.get_cpp_link_stdlib() {
println!("cargo:rustc-link-lib={}", stdlib);
}
}
}
}

Loading…
Cancel
Save