Add a test
This commit is contained in:
parent
c5fb4d0d2f
commit
d59b46fd49
1 changed files with 18 additions and 0 deletions
18
src/test/run-pass/no-core-2.rs
Normal file
18
src/test/run-pass/no-core-2.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#![allow(dead_code, unused_imports)]
|
||||||
|
#![feature(no_core)]
|
||||||
|
#![no_core]
|
||||||
|
// edition:2018
|
||||||
|
|
||||||
|
extern crate std;
|
||||||
|
extern crate core;
|
||||||
|
use core::{prelude::v1::*, *};
|
||||||
|
|
||||||
|
fn foo() {
|
||||||
|
for _ in &[()] {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bar() -> Option<()> {
|
||||||
|
None?
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue