From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- library/backtrace/crates/as-if-std/src/lib.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 library/backtrace/crates/as-if-std/src/lib.rs (limited to 'library/backtrace/crates/as-if-std/src/lib.rs') diff --git a/library/backtrace/crates/as-if-std/src/lib.rs b/library/backtrace/crates/as-if-std/src/lib.rs new file mode 100644 index 000000000..c0f49b77d --- /dev/null +++ b/library/backtrace/crates/as-if-std/src/lib.rs @@ -0,0 +1,21 @@ +// A crate which builds the `backtrace` crate as-if it's included as a +// submodule into the standard library. We try to set this crate up similarly +// to the standard library itself to minimize the likelihood of issues when +// updating the `backtrace` crate. + +#![no_std] + +extern crate alloc; + +// We want to `pub use std::*` in the root but we don't want `std` available in +// the root namespace, so do this in a funky inner module. +mod __internal { + extern crate std; + pub use std::*; +} + +pub use __internal::*; + +// This is the magical part which we hope works. +#[path = "../../../src/lib.rs"] +mod the_backtrace_crate; -- cgit v1.2.3