diff options
Diffstat (limited to 'tests/ui/auto-traits/issue-23080.rs')
-rw-r--r-- | tests/ui/auto-traits/issue-23080.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/auto-traits/issue-23080.rs b/tests/ui/auto-traits/issue-23080.rs new file mode 100644 index 000000000..84e2ce66f --- /dev/null +++ b/tests/ui/auto-traits/issue-23080.rs @@ -0,0 +1,17 @@ +#![feature(auto_traits)] +#![feature(negative_impls)] + +unsafe auto trait Trait { + fn method(&self) { //~ ERROR E0380 + println!("Hello"); + } +} + +fn call_method<T: Trait>(x: T) { + x.method(); +} + +fn main() { + // ICE + call_method(()); +} |