From b39921c49eca9f9973992cd99f0d1aa1472c8632 Mon Sep 17 00:00:00 2001 From: Piotr Jawniak Date: Sat, 27 Sep 2014 08:14:12 +0200 Subject: [PATCH] Add test for #16465 Closes #16465 --- src/test/compile-fail/issue-16465.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/compile-fail/issue-16465.rs diff --git a/src/test/compile-fail/issue-16465.rs b/src/test/compile-fail/issue-16465.rs new file mode 100644 index 00000000000..cc2cfa9a9fa --- /dev/null +++ b/src/test/compile-fail/issue-16465.rs @@ -0,0 +1,24 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Used to cause an ICE + +struct Foo{ + x : T +} + +type FooInt = Foo; + +impl Drop for FooInt { +//~^ ERROR cannot implement a destructor on a structure with type parameters + fn drop(&mut self){} +} + +fn main() {}