Skip to content

Commit 000d5ae

Browse files
committed
no-core-1.rs
1 parent 85ac5dd commit 000d5ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/ui/no_std/no-core-with-explicit-std-core.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
//! Test that you can use `#![no_core]` and still import std and core manually.
2+
//!
3+
//! The `#![no_core]` attribute disables the automatic core prelude, but you should
4+
//! still be able to explicitly import both `std` and `core` crates and use types
5+
//! like `Option` normally.
6+
17
//@ run-pass
28

39
#![allow(stable_features)]
410
#![feature(no_core, core)]
511
#![no_core]
612

7-
extern crate std;
813
extern crate core;
14+
extern crate std;
915

1016
use std::option::Option::Some;
1117

0 commit comments

Comments
 (0)