mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
This commit imports libcore 1.49.0 into a new directory, "libgrust/rustc-lib/core". LICENSE-* files are taken from the rustc 1.49.0 repository root. libgrust/ChangeLog: * rustc-lib/LICENSE-APACHE: New file. * rustc-lib/LICENSE-MIT: New file. * rustc-lib/version-info: New file. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
15 lines
309 B
Rust
15 lines
309 B
Rust
use core::task::Poll;
|
|
|
|
#[test]
|
|
fn poll_const() {
|
|
// test that the methods of `Poll` are usable in a const context
|
|
|
|
const POLL: Poll<usize> = Poll::Pending;
|
|
|
|
const IS_READY: bool = POLL.is_ready();
|
|
assert!(!IS_READY);
|
|
|
|
const IS_PENDING: bool = POLL.is_pending();
|
|
assert!(IS_PENDING);
|
|
}
|