Skip to content

Commit 5ccaaa8

Browse files
committed
Deny bare trait objects in in src/librustc_allocator
1 parent 77117e3 commit 5ccaaa8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustc_allocator/expand.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use {AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
3737

3838
pub fn modify(
3939
sess: &ParseSess,
40-
resolver: &mut Resolver,
40+
resolver: &mut dyn Resolver,
4141
krate: Crate,
4242
crate_name: String,
4343
handler: &rustc_errors::Handler,
@@ -56,7 +56,7 @@ struct ExpandAllocatorDirectives<'a> {
5656
found: bool,
5757
handler: &'a rustc_errors::Handler,
5858
sess: &'a ParseSess,
59-
resolver: &'a mut Resolver,
59+
resolver: &'a mut dyn Resolver,
6060
crate_name: Option<String>,
6161

6262
// For now, we disallow `global_allocator` in submodules because hygiene is hard. Keep track of
@@ -256,7 +256,7 @@ impl<'a> AllocFnFactory<'a> {
256256
&self,
257257
ty: &AllocatorTy,
258258
args: &mut Vec<Arg>,
259-
ident: &mut FnMut() -> Ident,
259+
ident: &mut dyn FnMut() -> Ident,
260260
) -> P<Expr> {
261261
match *ty {
262262
AllocatorTy::Layout => {

src/librustc_allocator/lib.rs

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

11+
#![deny(bare_trait_objects)]
1112
#![feature(rustc_private)]
1213

1314
#[macro_use] extern crate log;

0 commit comments

Comments
 (0)