]> git.lizzy.rs Git - rust.git/commitdiff
Deny bare trait objects in in src/librustc_allocator
authorljedrz <ljedrz@gmail.com>
Wed, 11 Jul 2018 10:08:49 +0000 (12:08 +0200)
committerljedrz <ljedrz@gmail.com>
Wed, 11 Jul 2018 10:08:49 +0000 (12:08 +0200)
src/librustc_allocator/expand.rs
src/librustc_allocator/lib.rs

index 373ab04de4b825bbd1ea31ee512cea24a6b9feba..ffbbd8a33a1d04fdc748fe13475a0902c5f42a50 100644 (file)
@@ -37,7 +37,7 @@
 
 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 @@ fn arg_ty(
         &self,
         ty: &AllocatorTy,
         args: &mut Vec<Arg>,
-        ident: &mut FnMut() -> Ident,
+        ident: &mut dyn FnMut() -> Ident,
     ) -> P<Expr> {
         match *ty {
             AllocatorTy::Layout => {
index b217d3665a24542306a6dceb838acbf80f7ab428..1227936ce96fc89a3cdc5352918e8d253b59cb2c 100644 (file)
@@ -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;