diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2018-07-11 12:38:42 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-11 12:38:42 -0600 |
| commit | 8d9a6a7eddca697c8916b2dad08f1a5fd4ea18b7 (patch) | |
| tree | f2fe228c1e72a2a8b28946d1722a10bc103be712 | |
| parent | 2774179f70ce4294a540c3055e7651024cde0b64 (diff) | |
| parent | 5ccaaa80d001522204098079abf25e43f33c9697 (diff) | |
| download | rust-8d9a6a7eddca697c8916b2dad08f1a5fd4ea18b7.tar.gz rust-8d9a6a7eddca697c8916b2dad08f1a5fd4ea18b7.zip | |
Rollup merge of #52248 - ljedrz:dyn_librustc_allocator, r=oli-obk
Deny bare trait objects in in src/librustc_allocator Enforce `#![deny(bare_trait_objects)]` in `src/librustc_allocator`.
| -rw-r--r-- | src/librustc_allocator/expand.rs | 6 | ||||
| -rw-r--r-- | src/librustc_allocator/lib.rs | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs index 373ab04de4b..ffbbd8a33a1 100644 --- a/src/librustc_allocator/expand.rs +++ b/src/librustc_allocator/expand.rs @@ -37,7 +37,7 @@ use {AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS}; pub fn modify( sess: &ParseSess, - resolver: &mut Resolver, + resolver: &mut dyn Resolver, krate: Crate, crate_name: String, handler: &rustc_errors::Handler, @@ -56,7 +56,7 @@ struct ExpandAllocatorDirectives<'a> { found: bool, handler: &'a rustc_errors::Handler, sess: &'a ParseSess, - resolver: &'a mut Resolver, + resolver: &'a mut dyn Resolver, crate_name: Option<String>, // For now, we disallow `global_allocator` in submodules because hygiene is hard. Keep track of @@ -256,7 +256,7 @@ impl<'a> AllocFnFactory<'a> { &self, ty: &AllocatorTy, args: &mut Vec<Arg>, - ident: &mut FnMut() -> Ident, + ident: &mut dyn FnMut() -> Ident, ) -> P<Expr> { match *ty { AllocatorTy::Layout => { diff --git a/src/librustc_allocator/lib.rs b/src/librustc_allocator/lib.rs index b217d3665a2..1227936ce96 100644 --- a/src/librustc_allocator/lib.rs +++ b/src/librustc_allocator/lib.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![deny(bare_trait_objects)] #![feature(rustc_private)] #[macro_use] extern crate log; |
