From 4fd04c34cdeb3f741e975337b8e86ab4bc23298e Mon Sep 17 00:00:00 2001 From: Philip Munksgaard Date: Fri, 19 Jun 2015 18:36:54 +0200 Subject: [PATCH] Add test for #24227 --- src/test/run-pass/issue-24227.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/run-pass/issue-24227.rs diff --git a/src/test/run-pass/issue-24227.rs b/src/test/run-pass/issue-24227.rs new file mode 100644 index 0000000000000..34c16bd4003ad --- /dev/null +++ b/src/test/run-pass/issue-24227.rs @@ -0,0 +1,27 @@ +// 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. + +// This resulted in an ICE. Test for future-proofing +// Issue #24227 + +#![allow(unused)] + +struct Foo<'a> { + x: &'a u8 +} + +impl<'a> Foo<'a> { + fn foo() { + let mut tmp: Self; + } + +} + +fn main() {}