File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -689,6 +689,14 @@ pub use macros::exception;
689
689
/// [rfc1414]: https://github.com/rust-lang/rfcs/blob/master/text/1414-rvalue_static_promotion.md
690
690
pub use macros:: pre_init;
691
691
692
+ // We export this static with an informative name so that if an application attempts to link
693
+ // two copies of cortex-m-rt together, linking will fail. We also declare a links key in
694
+ // Cargo.toml which is the more modern way to solve the same problem, but we have to keep
695
+ // __ONCE__ around to prevent linking with versions before the links key was added.
696
+ #[ export_name = "error: cortex-m-rt appears more than once in the dependency graph" ]
697
+ #[ doc( hidden) ]
698
+ pub static __ONCE__: ( ) = ( ) ;
699
+
692
700
/// Registers stacked (pushed onto the stack) during an exception.
693
701
#[ derive( Clone , Copy ) ]
694
702
#[ repr( C ) ]
You can’t perform that action at this time.
0 commit comments