Skip to content
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

Deny bare trait objects in the rest of rust #52302

Merged
merged 1 commit into from
Jul 13, 2018
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
2 changes: 2 additions & 0 deletions src/build_helper/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

use std::fs::File;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
Expand Down
1 change: 1 addition & 0 deletions src/liballoc_jemalloc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#![no_std]
#![allow(unused_attributes)]
#![deny(bare_trait_objects)]
#![unstable(feature = "alloc_jemalloc",
reason = "implementation detail of std, does not provide any public API",
issue = "0")]
Expand Down
1 change: 1 addition & 0 deletions src/liballoc_system/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#![no_std]
#![allow(unused_attributes)]
#![deny(bare_trait_objects)]
#![unstable(feature = "alloc_system",
reason = "this library is unlikely to be stabilized in its current \
form or name",
Expand Down
1 change: 1 addition & 0 deletions src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#![cfg_attr(test, feature(test))]

#![allow(deprecated)]
#![deny(bare_trait_objects)]

extern crate alloc;
extern crate rustc_data_structures;
Expand Down
2 changes: 2 additions & 0 deletions src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//! Parsing does not happen at runtime: structures of `std::fmt::rt` are
//! generated instead.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/",
Expand Down
2 changes: 2 additions & 0 deletions src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@
//!
//! * [DOT language](http://www.graphviz.org/doc/info/lang.html)

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/",
Expand Down
1 change: 1 addition & 0 deletions src/libpanic_abort/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
#![panic_runtime]
#![allow(unused_features)]
#![deny(bare_trait_objects)]

#![feature(core_intrinsics)]
#![feature(libc)]
Expand Down
1 change: 1 addition & 0 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//! See [the book](../book/first-edition/procedural-macros.html) for more.

#![stable(feature = "proc_macro_lib", since = "1.15.0")]
#![deny(bare_trait_objects)]
#![deny(missing_docs)]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
Expand Down
1 change: 1 addition & 0 deletions src/libprofiler_builtins/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
reason = "internal implementation detail of rustc right now",
issue = "0")]
#![allow(unused_features)]
#![deny(bare_trait_objects)]
#![feature(staged_api)]
2 changes: 2 additions & 0 deletions src/librustc_apfloat/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
//!
//! This API is completely unstable and subject to change.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_asan/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![sanitizer_runtime]
#![feature(alloc_system)]
#![feature(sanitizer_runtime)]
Expand Down
1 change: 1 addition & 0 deletions src/librustc_borrowck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]

#![allow(non_camel_case_types)]
#![deny(bare_trait_objects)]

#![feature(from_ref)]
#![feature(quote)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_incremental/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

//! Support for serializing the dep-graph and reloading it.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
//!
//! This API is completely unstable and subject to change.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
1 change: 1 addition & 0 deletions src/librustc_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_lsan/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![sanitizer_runtime]
#![feature(alloc_system)]
#![feature(sanitizer_runtime)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!

*/

#![deny(bare_trait_objects)]

#![feature(slice_patterns)]
#![feature(slice_sort_by_cached_key)]
#![feature(from_ref)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_msan/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![sanitizer_runtime]
#![feature(alloc_system)]
#![feature(sanitizer_runtime)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_passes/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//!
//! This API is completely unstable and subject to change.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
1 change: 1 addition & 0 deletions src/librustc_platform_intrinsics/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

#![allow(bad_style)]
#![deny(bare_trait_objects)]

pub struct Intrinsic {
pub inputs: &'static [&'static Type],
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_plugin/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
//! See the [`plugin` feature](../unstable-book/language-features/plugin.html) of
//! the Unstable Book for more examples.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_traits/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
//! New recursive solver modeled on Chalk's recursive solver. Most of
//! the guts are broken up into modules; see the comments in those modules.

#![deny(bare_trait_objects)]

#![feature(crate_in_paths)]
#![feature(crate_visibility_modifier)]
#![feature(extern_prelude)]
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_tsan/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![sanitizer_runtime]
#![feature(alloc_system)]
#![feature(sanitizer_runtime)]
Expand Down
2 changes: 2 additions & 0 deletions src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
//!
//! This API is completely unstable and subject to change.

#![deny(bare_trait_objects)]

#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
Expand Down
2 changes: 2 additions & 0 deletions src/libunwind/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(bare_trait_objects)]

#![no_std]
#![unstable(feature = "panic_unwind", issue = "32837")]

Expand Down