b345437c3c
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
21 lines
638 B
Rust
21 lines
638 B
Rust
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
|
// file at the top-level directory of this distribution and at
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
// option. This file may not be copied, modified, or distributed
|
|
// except according to those terms.
|
|
|
|
// compile-flags: --cap-lints warn
|
|
|
|
#![deny(warnings)]
|
|
#![feature(rustc_attrs)]
|
|
|
|
use std::option; //~ WARN
|
|
|
|
#[rustc_error]
|
|
fn main() {} //~ ERROR: compilation successful
|
|
|