diff options
| author | bors <bors@rust-lang.org> | 2014-07-16 02:11:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-07-16 02:11:14 +0000 |
| commit | c523d86552d6797ad52acece4e2e65cb319ee4f2 (patch) | |
| tree | 2fc16da524e27fcdbe9434b300bf535ad775155c /src/test | |
| parent | afbcbbc77ffc6b10053bc543daf7d2e05d68cc01 (diff) | |
| parent | 446f9373c05900125f30f244441c5833ce64e146 (diff) | |
| download | rust-c523d86552d6797ad52acece4e2e65cb319ee4f2.tar.gz rust-c523d86552d6797ad52acece4e2e65cb319ee4f2.zip | |
auto merge of #15585 : bgamari/rust/subst-bug, r=pnkfelix
This branch has a fix for #15557 (a2bcef9) as well as a variety of patches I found useful while debugging this issue. These include adding `Show` impls to a variety of types, including the majority of `syntax::ast` and some of `middle::ty`.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/unsafe-destructor-check-crash.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/compile-fail/unsafe-destructor-check-crash.rs b/src/test/compile-fail/unsafe-destructor-check-crash.rs new file mode 100644 index 00000000000..af675587728 --- /dev/null +++ b/src/test/compile-fail/unsafe-destructor-check-crash.rs @@ -0,0 +1,23 @@ +// 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + + + +// Regression test for issue #15557 + +#![allow(dead_code)] +struct AReg1<'a>(&'a u32); + +impl<'a> Drop for AReg1<'a> { +//~^ ERROR: cannot implement a destructor on a structure with type parameters + fn drop(&mut self) {} +} + +fn main() {} |
