Skip to content

Commit 8fecbe3

Browse files
committed
Deny bare trait objects in src/librustc_resolve
1 parent c946c25 commit 8fecbe3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/librustc_resolve/lib.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![deny(bare_trait_objects)]
12+
1113
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
1214
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
1315
html_root_url = "https://doc.rust-lang.org/nightly/")]
@@ -1292,7 +1294,7 @@ impl PrimitiveTypeTable {
12921294
/// This is the visitor that walks the whole crate.
12931295
pub struct Resolver<'a> {
12941296
session: &'a Session,
1295-
cstore: &'a CrateStore,
1297+
cstore: &'a dyn CrateStore,
12961298

12971299
pub definitions: Definitions,
12981300

@@ -1388,7 +1390,7 @@ pub struct Resolver<'a> {
13881390
/// true if `#![feature(use_extern_macros)]`
13891391
use_extern_macros: bool,
13901392

1391-
crate_loader: &'a mut CrateLoader,
1393+
crate_loader: &'a mut dyn CrateLoader,
13921394
macro_names: FxHashSet<Ident>,
13931395
global_macros: FxHashMap<Name, &'a NameBinding<'a>>,
13941396
pub all_macros: FxHashMap<Name, Def>,
@@ -1604,11 +1606,11 @@ impl<'a> Resolver<'a> {
16041606

16051607
impl<'a> Resolver<'a> {
16061608
pub fn new(session: &'a Session,
1607-
cstore: &'a CrateStore,
1609+
cstore: &'a dyn CrateStore,
16081610
krate: &Crate,
16091611
crate_name: &str,
16101612
make_glob_map: MakeGlobMap,
1611-
crate_loader: &'a mut CrateLoader,
1613+
crate_loader: &'a mut dyn CrateLoader,
16121614
arenas: &'a ResolverArenas<'a>)
16131615
-> Resolver<'a> {
16141616
let root_def_id = DefId::local(CRATE_DEF_INDEX);

0 commit comments

Comments
 (0)