#![allow(dead_code, deprecated, unused_variables, unused_mut)] fn main() { let x: Option = Some("hey".to_owned()); assert_eq!(x.as_deref(), Some("hey")); let x: Option = None; assert_eq!(x.as_deref(), None); }