From c786b68dd3ecf96e202f50ba600292f54b35f2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Br=C3=BCschweiler?= Date: Fri, 7 Jun 2013 18:06:38 +0200 Subject: [PATCH] Add a test that causes an ICE currently --- src/test/compile-fail/unconstrained-ref.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/compile-fail/unconstrained-ref.rs diff --git a/src/test/compile-fail/unconstrained-ref.rs b/src/test/compile-fail/unconstrained-ref.rs new file mode 100644 index 00000000000..80bd83caf32 --- /dev/null +++ b/src/test/compile-fail/unconstrained-ref.rs @@ -0,0 +1,17 @@ +// Copyright 2012 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. + +struct S<'self, T> { + o: &'self Option +} + +fn main() { + S { o: &None }; //~ ERROR cannot determine a type for this expression: unconstrained type +}