Change tests per RFC 246 (const vs static)
This commit is contained in:
parent
5180a7ccc5
commit
20cccfa67f
@ -13,5 +13,4 @@ pub fn cci_fn() -> usize {
|
||||
1200
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub static CCI_STATIC: usize = 34;
|
||||
pub const CCI_CONST: usize = 34;
|
||||
|
@ -8,13 +8,10 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[inline(never)]
|
||||
pub static global: isize = 3;
|
||||
|
||||
#[inline(never)]
|
||||
static global0: isize = 4;
|
||||
|
||||
#[inline(never)]
|
||||
pub static global2: &'static isize = &global0;
|
||||
|
||||
pub fn verify_same(a: &'static isize) {
|
||||
|
@ -16,23 +16,23 @@
|
||||
|
||||
|
||||
extern crate sepcomp_cci_lib;
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_CONST};
|
||||
|
||||
fn call1() -> usize {
|
||||
cci_fn() + CCI_STATIC
|
||||
cci_fn() + CCI_CONST
|
||||
}
|
||||
|
||||
mod a {
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_CONST};
|
||||
pub fn call2() -> usize {
|
||||
cci_fn() + CCI_STATIC
|
||||
cci_fn() + CCI_CONST
|
||||
}
|
||||
}
|
||||
|
||||
mod b {
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
|
||||
use sepcomp_cci_lib::{cci_fn, CCI_CONST};
|
||||
pub fn call3() -> usize {
|
||||
cci_fn() + CCI_STATIC
|
||||
cci_fn() + CCI_CONST
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user