aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vadzim Dambrouski <pftbest@gmail.com> 2017-10-12 01:35:29 +0300
committerGravatar Vadzim Dambrouski <pftbest@gmail.com> 2017-10-12 01:36:46 +0300
commit4fecabeb62f62f4d6b2ae86731e14d70fd5c1ee0 (patch)
tree6cd40f740cc8dfa1688f651b7d1ba2389a67e2f6
parent916747f1c6a47d60c35d5f2c86d9e2a7dfdce7bc (diff)
downloadcortex-m-4fecabeb62f62f4d6b2ae86731e14d70fd5c1ee0.tar.gz
cortex-m-4fecabeb62f62f4d6b2ae86731e14d70fd5c1ee0.tar.zst
cortex-m-4fecabeb62f62f4d6b2ae86731e14d70fd5c1ee0.zip
Don't include lang_items when in test mode.
This would allow running regular `cargo test` on a crates that depend on this crate. Depends on #37
-rw-r--r--cortex-m-rt/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs
index b83d53c..15591d3 100644
--- a/cortex-m-rt/src/lib.rs
+++ b/cortex-m-rt/src/lib.rs
@@ -219,7 +219,7 @@
//!
//! Allocating the call stack on a different RAM region.
//!
-//! ```
+//! ```,ignore
//! MEMORY
//! {
//! /* call stack will go here */
@@ -247,7 +247,7 @@
//!
//! Locate the `.text` section 1024 bytes after the start of the FLASH region.
//!
-//! ```
+//! ```,ignore
//! _stext = ORIGIN(FLASH) + 0x400;
//! ```
//!
@@ -260,7 +260,7 @@
//!
//! #### Example
//!
-//! ```
+//! ```,ignore
//! extern crate some_allocator;
//!
//! // Size of the heap in bytes
@@ -295,6 +295,7 @@ extern crate cortex_m;
extern crate compiler_builtins;
extern crate r0;
+#[cfg(not(test))]
mod lang_items;
#[cfg(target_arch = "arm")]