diff options
| author | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-05-12 11:02:47 +0200 |
|---|---|---|
| committer | Johannes Oertel <johannes.oertel@uni-due.de> | 2015-05-12 12:24:20 +0200 |
| commit | 23300a39a1ceffdba4c4695fc2e527e47ea2c95d (patch) | |
| tree | b07a27dda46f1515d72390749aa698da1001a03c | |
| parent | 1d1570acc9ac9d76394da05f63fa7881b6492ab9 (diff) | |
| download | rust-23300a39a1ceffdba4c4695fc2e527e47ea2c95d.tar.gz rust-23300a39a1ceffdba4c4695fc2e527e47ea2c95d.zip | |
Add regression test for #20413
Closes #20413.
| -rw-r--r-- | src/test/compile-fail/issue-20413.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-20413.rs b/src/test/compile-fail/issue-20413.rs new file mode 100644 index 00000000000..a48c03aa178 --- /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 <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. + +trait Foo { + fn answer(self); +} + +struct NoData<T>; +//~^ ERROR: parameter `T` is never used + +impl<T> Foo for T where NoData<T>: Foo { +//~^ ERROR: overflow evaluating the requirement + fn answer(self) { + let val: NoData<T> = NoData; + } +} + +fn main() {} |
