diff options
Diffstat (limited to 'tests/ui/auxiliary')
-rw-r--r-- | tests/ui/auxiliary/issue-13560-1.rs | 3 | ||||
-rw-r--r-- | tests/ui/auxiliary/issue-13560-2.rs | 3 | ||||
-rw-r--r-- | tests/ui/auxiliary/issue-13560-3.rs | 6 | ||||
-rw-r--r-- | tests/ui/auxiliary/issue-16822.rs | 20 | ||||
-rw-r--r-- | tests/ui/auxiliary/issue-18502.rs | 21 | ||||
-rw-r--r-- | tests/ui/auxiliary/issue-24106.rs | 13 | ||||
-rw-r--r-- | tests/ui/auxiliary/xc-private-method-lib.rs | 33 |
7 files changed, 66 insertions, 33 deletions
diff --git a/tests/ui/auxiliary/issue-13560-1.rs b/tests/ui/auxiliary/issue-13560-1.rs new file mode 100644 index 000000000..c3a2ae679 --- /dev/null +++ b/tests/ui/auxiliary/issue-13560-1.rs @@ -0,0 +1,3 @@ +// no-prefer-dynamic + +#![crate_type = "dylib"] diff --git a/tests/ui/auxiliary/issue-13560-2.rs b/tests/ui/auxiliary/issue-13560-2.rs new file mode 100644 index 000000000..39c261e11 --- /dev/null +++ b/tests/ui/auxiliary/issue-13560-2.rs @@ -0,0 +1,3 @@ +// no-prefer-dynamic + +#![crate_type = "rlib"] diff --git a/tests/ui/auxiliary/issue-13560-3.rs b/tests/ui/auxiliary/issue-13560-3.rs new file mode 100644 index 000000000..e991bcc1a --- /dev/null +++ b/tests/ui/auxiliary/issue-13560-3.rs @@ -0,0 +1,6 @@ +// no-prefer-dynamic + +#![crate_type = "rlib"] + +#[macro_use] #[no_link] extern crate issue_13560_1 as t1; +#[macro_use] extern crate issue_13560_2 as t2; diff --git a/tests/ui/auxiliary/issue-16822.rs b/tests/ui/auxiliary/issue-16822.rs new file mode 100644 index 000000000..9042dd391 --- /dev/null +++ b/tests/ui/auxiliary/issue-16822.rs @@ -0,0 +1,20 @@ +#![crate_type="lib"] + +use std::cell::RefCell; + +pub struct Window<Data>{ + pub data: RefCell<Data> +} + +impl<Data: Update> Window<Data> { + pub fn update(&self, e: i32) { + match e { + 1 => self.data.borrow_mut().update(), + _ => {} + } + } +} + +pub trait Update { + fn update(&mut self); +} diff --git a/tests/ui/auxiliary/issue-18502.rs b/tests/ui/auxiliary/issue-18502.rs new file mode 100644 index 000000000..4d4230607 --- /dev/null +++ b/tests/ui/auxiliary/issue-18502.rs @@ -0,0 +1,21 @@ +#![crate_type="lib"] + +struct Foo; +// This is the ICE trigger +struct Formatter; + +trait Show { + fn fmt(&self); +} + +impl Show for Foo { + fn fmt(&self) {} +} + +fn bar<T>(f: extern "Rust" fn(&T), t: &T) { } + +// ICE requirement: this has to be marked as inline +#[inline] +pub fn baz() { + bar(Show::fmt, &Foo); +} diff --git a/tests/ui/auxiliary/issue-24106.rs b/tests/ui/auxiliary/issue-24106.rs new file mode 100644 index 000000000..2c6a60348 --- /dev/null +++ b/tests/ui/auxiliary/issue-24106.rs @@ -0,0 +1,13 @@ +#![crate_type="lib"] + +enum E { E0 = 0, E1 = 1 } +const E0_U8: u8 = E::E0 as u8; +const E1_U8: u8 = E::E1 as u8; + +pub fn go<T>() { + match 0 { + E0_U8 => (), + E1_U8 => (), + _ => (), + } +} diff --git a/tests/ui/auxiliary/xc-private-method-lib.rs b/tests/ui/auxiliary/xc-private-method-lib.rs deleted file mode 100644 index 4d5ec6de3..000000000 --- a/tests/ui/auxiliary/xc-private-method-lib.rs +++ /dev/null @@ -1,33 +0,0 @@ -#![crate_type="lib"] - -pub struct Struct { - pub x: isize -} - -impl Struct { - fn static_meth_struct() -> Struct { - Struct { x: 1 } - } - - fn meth_struct(&self) -> isize { - self.x - } -} - -pub enum Enum { - Variant1(isize), - Variant2(isize) -} - -impl Enum { - fn static_meth_enum() -> Enum { - Enum::Variant2(10) - } - - fn meth_enum(&self) -> isize { - match *self { - Enum::Variant1(x) | - Enum::Variant2(x) => x - } - } -} |