Skip to content
Snippets Groups Projects
Select Git revision
  • 320141f01b823fc5a6cffc0fbbb2d8085a2eae9e
  • master default protected
  • stacked_borrows
  • generics_and_traits
  • crane_lift
  • spans
  • rust_syntax
  • type_check
  • expression
  • fallible
10 results

stacked_borrows.rs

  • bare3.1.rs 333 B
    //! bare3.rs
    //! Simple bare metal application
    #![no_std]
    
    extern crate cortex_m;
    extern crate stm32f40x;
    
    #[macro_use]
    extern crate cortex_m_debug;
    
    fn main() {
        let s = "ABCD";
        ipln!("s = {:?}", s);
    
        // iterate over the byte repr. of s
        for c in s.as_bytes() {
            ip!("{},", c)
        }
    
        ipln!();
        loop {}
    }