From 32911f6df5e49126f83d3289479405e37f3df94a Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 26 Sep 2013 09:29:43 +0200 Subject: [PATCH] Regression test for ICE. Fix #5153. --- src/test/compile-fail/issue-5153.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/compile-fail/issue-5153.rs diff --git a/src/test/compile-fail/issue-5153.rs b/src/test/compile-fail/issue-5153.rs new file mode 100644 index 0000000000000..37d2cce333a4a --- /dev/null +++ b/src/test/compile-fail/issue-5153.rs @@ -0,0 +1,23 @@ +// Copyright 2013 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. + +// error-pattern: type `@Foo:'static` does not implement any method in scope named `foo` + +trait Foo { + fn foo(~self); +} + +impl Foo for int { + fn foo(~self) { } +} + +fn main() { + (@5 as @Foo).foo(); +}