2025-06-30 00:05:58 +05:00
|
|
|
//! Test that you can use `#![no_core]` and still import std and core manually.
|
|
|
|
|
//!
|
|
|
|
|
//! The `#![no_core]` attribute disables the automatic core prelude, but you should
|
|
|
|
|
//! still be able to explicitly import both `std` and `core` crates and use types
|
|
|
|
|
//! like `Option` normally.
|
|
|
|
|
|
2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![allow(stable_features)]
|
2015-07-29 17:01:14 -07:00
|
|
|
#![feature(no_core, core)]
|
|
|
|
|
#![no_core]
|
|
|
|
|
|
|
|
|
|
extern crate core;
|
2025-06-30 00:05:58 +05:00
|
|
|
extern crate std;
|
2015-07-29 17:01:14 -07:00
|
|
|
|
|
|
|
|
use std::option::Option::Some;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let a = Some("foo");
|
|
|
|
|
a.unwrap();
|
|
|
|
|
}
|