rust/tests/ui/consts/issue-17718-references.rs
Ding Xiang Fei 1576a6d618
Stabilize const_refs_to_static
update tests

fix bitwidth-sensitive stderr output

use build-fail for asm tests
2024-09-26 13:21:15 +02:00

28 lines
489 B
Rust

//@ check-pass
#![allow(warnings)]
struct Struct {
a: usize,
}
const C: usize = 1;
static S: usize = 1;
const T1: &'static usize = &C;
const T2: &'static usize = &S;
static T3: &'static usize = &C;
static T4: &'static usize = &S;
const T5: usize = C;
const T6: usize = S;
static T7: usize = C;
static T8: usize = S;
const T9: Struct = Struct { a: C };
const T10: Struct = Struct { a: S };
static T11: Struct = Struct { a: C };
static T12: Struct = Struct { a: S };
fn main() {}