Skip to content

Remove unnecessary trailing semi-colon #1475

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

Merged
merged 1 commit into from
Aug 16, 2019
Merged
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
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ fn main() {
rustc_minor_version().expect("Failed to get rustc version");
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok();
#[allow(unused)]
let libc_ci = env::var("LIBC_CI").is_ok();

if env::var("CARGO_FEATURE_USE_STD").is_ok() {
Expand All @@ -28,6 +27,11 @@ fn main() {
Some(_) | None => println!("cargo:rustc-cfg=freebsd11"),
}

// On CI: deny all warnings
if libc_ci {
println!("cargo:rustc-cfg=libc_deny_warnings");
}

// Rust >= 1.15 supports private module use:
if rustc_minor_ver >= 15 || rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_priv_mod_use");
Expand Down
6 changes: 3 additions & 3 deletions ci/azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- template: azure-install-rust.yml
- script: sh ci/style.sh
displayName: Check style
- script: sh ci/dox.sh
- script: LIBC_CI=1 sh ci/dox.sh
displayName: Generate documentation
- template: azure-configs/static-websites.yml@rustinfra
parameters:
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
vmImage: ubuntu-16.04
steps:
- template: azure-install-rust.yml
- script: sh ./ci/build.sh
- script: LIBC_CI=1 sh ./ci/build.sh
displayName: Execute build.sh
strategy:
matrix:
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
vmImage: macos-10.13
steps:
- template: azure-install-rust.yml
- script: sh ./ci/build.sh
- script: LIBC_CI=1 sh ./ci/build.sh
displayName: Execute build.sh
strategy:
matrix:
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
//! [pd]: https://rust-lang.github.io/libc/#platform-specific-documentation
#![crate_name = "libc"]
#![crate_type = "rlib"]
#![cfg_attr(not(feature = "rustc-dep-of-std"), deny(warnings))]
#![cfg_attr(libc_deny_warnings, deny(warnings))]
#![allow(bad_style, overflowing_literals, improper_ctypes, unknown_lints)]
// FIXME: this is due to a rustc bug
#![allow(redundant_semicolon)]
// Attributes needed when building as part of the standard library
#![cfg_attr(
feature = "rustc-dep-of-std",
Expand Down