diff options
Diffstat (limited to 'src/test/ui/statics/auxiliary')
5 files changed, 0 insertions, 57 deletions
diff --git a/src/test/ui/statics/auxiliary/static-function-pointer-aux.rs b/src/test/ui/statics/auxiliary/static-function-pointer-aux.rs deleted file mode 100644 index 4dfc25764..000000000 --- a/src/test/ui/statics/auxiliary/static-function-pointer-aux.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub fn f(x: isize) -> isize { -x } - -pub static F: fn(isize) -> isize = f; -pub static mut MutF: fn(isize) -> isize = f; diff --git a/src/test/ui/statics/auxiliary/static-methods-crate.rs b/src/test/ui/statics/auxiliary/static-methods-crate.rs deleted file mode 100644 index 7ff3bc0dd..000000000 --- a/src/test/ui/statics/auxiliary/static-methods-crate.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![crate_name="static_methods_crate"] -#![crate_type = "lib"] - -pub trait read: Sized { - fn readMaybe(s: String) -> Option<Self>; -} - -impl read for isize { - fn readMaybe(s: String) -> Option<isize> { - s.parse().ok() - } -} - -impl read for bool { - fn readMaybe(s: String) -> Option<bool> { - match &*s { - "true" => Some(true), - "false" => Some(false), - _ => None - } - } -} - -pub fn read<T:read>(s: String) -> T { - match read::readMaybe(s) { - Some(x) => x, - _ => panic!("read panicked!") - } -} diff --git a/src/test/ui/statics/auxiliary/static_fn_inline_xc_aux.rs b/src/test/ui/statics/auxiliary/static_fn_inline_xc_aux.rs deleted file mode 100644 index 8d0f7f61c..000000000 --- a/src/test/ui/statics/auxiliary/static_fn_inline_xc_aux.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub mod num { - pub trait Num2 { - fn from_int2(n: isize) -> Self; - } -} - -pub mod f64 { - impl ::num::Num2 for f64 { - #[inline] - fn from_int2(n: isize) -> f64 { return n as f64; } - } -} diff --git a/src/test/ui/statics/auxiliary/static_fn_trait_xc_aux.rs b/src/test/ui/statics/auxiliary/static_fn_trait_xc_aux.rs deleted file mode 100644 index b8aed2c5f..000000000 --- a/src/test/ui/statics/auxiliary/static_fn_trait_xc_aux.rs +++ /dev/null @@ -1,11 +0,0 @@ -pub mod num { - pub trait Num2 { - fn from_int2(n: isize) -> Self; - } -} - -pub mod f64 { - impl ::num::Num2 for f64 { - fn from_int2(n: isize) -> f64 { return n as f64; } - } -} diff --git a/src/test/ui/statics/auxiliary/static_mut_xc.rs b/src/test/ui/statics/auxiliary/static_mut_xc.rs deleted file mode 100644 index 264a2243a..000000000 --- a/src/test/ui/statics/auxiliary/static_mut_xc.rs +++ /dev/null @@ -1 +0,0 @@ -pub static mut a: isize = 3; |