From 1d1570acc9ac9d76394da05f63fa7881b6492ab9 Mon Sep 17 00:00:00 2001 From: Johannes Oertel Date: Mon, 11 May 2015 22:51:31 +0200 Subject: [PATCH 1/2] Add regression test for #18075 Closes #18075. --- src/test/run-pass/issue-18075.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/run-pass/issue-18075.rs diff --git a/src/test/run-pass/issue-18075.rs b/src/test/run-pass/issue-18075.rs new file mode 100644 index 0000000000000..5f07ba2235fd5 --- /dev/null +++ b/src/test/run-pass/issue-18075.rs @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// exec-env:RUST_LOG=rustc::middle=debug + +fn main() { + let b = 1isize; + println!("{}", b); +} From 23300a39a1ceffdba4c4695fc2e527e47ea2c95d Mon Sep 17 00:00:00 2001 From: Johannes Oertel Date: Tue, 12 May 2015 11:02:47 +0200 Subject: [PATCH 2/2] Add regression test for #20413 Closes #20413. --- src/test/compile-fail/issue-20413.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/compile-fail/issue-20413.rs diff --git a/src/test/compile-fail/issue-20413.rs b/src/test/compile-fail/issue-20413.rs new file mode 100644 index 0000000000000..a48c03aa178c3 --- /dev/null +++ b/src/test/compile-fail/issue-20413.rs @@ -0,0 +1,25 @@ +// Copyright 2015 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. + +trait Foo { + fn answer(self); +} + +struct NoData; +//~^ ERROR: parameter `T` is never used + +impl Foo for T where NoData: Foo { +//~^ ERROR: overflow evaluating the requirement + fn answer(self) { + let val: NoData = NoData; + } +} + +fn main() {}