mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
15 lines
226 B
Rust
15 lines
226 B
Rust
//@ run-pass
|
|
|
|
const fn foo() -> *const i8 {
|
|
b"foo" as *const _ as *const i8
|
|
}
|
|
|
|
const fn bar() -> i32 {
|
|
*&{(1, 2, 3).1}
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(foo(), b"foo" as *const _ as *const i8);
|
|
assert_eq!(bar(), 2);
|
|
}
|