]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_builtin_macros/src/deriving/debug.rs
Add ~const bounds trait bounds when using derive_const
[rust.git] / compiler / rustc_builtin_macros / src / deriving / debug.rs
index 74e2597830e7ed27a1fd0fae301052628d9ffb9e..e8a353b1c8fcc61474ad64cb001971ede5a5b67a 100644 (file)
@@ -153,7 +153,10 @@ fn expr_for_field(
         let path_debug = cx.path_global(span, cx.std_path(&[sym::fmt, sym::Debug]));
         let ty_dyn_debug = cx.ty(
             span,
-            ast::TyKind::TraitObject(vec![cx.trait_bound(path_debug)], ast::TraitObjectSyntax::Dyn),
+            ast::TyKind::TraitObject(
+                vec![cx.trait_bound(path_debug, false)],
+                ast::TraitObjectSyntax::Dyn,
+            ),
         );
         let ty_slice = cx.ty(
             span,