File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 22// submodule into the standard library. We try to set this crate up similarly
33// to the standard library itself to minimize the likelihood of issues when
44// updating the `backtrace` crate.
5-
5+ #! [ feature ( optimize_attribute ) ]
66#![ no_std]
77
88extern crate alloc;
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ struct Context<'a> {
114114}
115115
116116impl < ' data > Context < ' data > {
117+ // #[feature(optimize_attr)] is enabled when we're built inside libstd
118+ #[ cfg_attr( backtrace_in_libstd, optimize( size) ) ]
117119 fn new (
118120 stash : & ' data Stash ,
119121 object : Object < ' data > ,
@@ -355,6 +357,8 @@ impl Cache {
355357 }
356358
357359 // unsafe because this is required to be externally synchronized
360+ // #[feature(optimize_attr)] is enabled when we're built inside libstd
361+ #[ cfg_attr( backtrace_in_libstd, optimize( size) ) ]
358362 unsafe fn with_global ( f : impl FnOnce ( & mut Self ) ) {
359363 // A very small, very simple LRU cache for debug info mappings.
360364 //
You can’t perform that action at this time.
0 commit comments