Skip to content

Commit 146f1dc

Browse files
committed
Make optimize_attribute conditional on libstd
1 parent 28ec93b commit 146f1dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/as-if-std/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
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-
#![feature(optimize_attribute)]
5+
#![cfg_attr(
6+
// Only used by the gimli backend
7+
all(backtrace_in_libstd, unix, not(target_os = "emscripten")),
8+
feature(optimize_attribute)
9+
)]
610
#![no_std]
711

812
extern crate alloc;

0 commit comments

Comments
 (0)