diff options
| author | Chris Stankus <cdstankus@gmail.com> | 2017-01-18 00:16:19 -0600 |
|---|---|---|
| committer | Chris Stankus <cdstankus@gmail.com> | 2017-01-18 00:16:19 -0600 |
| commit | 5c58653e46b73bbc2bb6811be2eefa4b6675c942 (patch) | |
| tree | 0be338faf852011bef1f378b60c1dd1cbda36a88 /src/test/compile-fail | |
| parent | c07a6ae77cd4ceb3cf591d34c5608ca91d1f75d4 (diff) | |
| download | rust-5c58653e46b73bbc2bb6811be2eefa4b6675c942.tar.gz rust-5c58653e46b73bbc2bb6811be2eefa4b6675c942.zip | |
E0122 should apply with where clauses
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/issue-17994.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-39122.rs | 13 | ||||
| -rw-r--r-- | src/test/compile-fail/private-in-public-warn.rs | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/test/compile-fail/issue-17994.rs b/src/test/compile-fail/issue-17994.rs index fcbc08327b9..ac15bd9d15b 100644 --- a/src/test/compile-fail/issue-17994.rs +++ b/src/test/compile-fail/issue-17994.rs @@ -9,5 +9,6 @@ // except according to those terms. trait Tr {} -type Huh<T> where T: Tr = isize; //~ ERROR type parameter `T` is unused +type Huh<T> where T: Tr = isize; //~ ERROR type parameter `T` is unused + //~| WARNING E0122 fn main() {} diff --git a/src/test/compile-fail/issue-39122.rs b/src/test/compile-fail/issue-39122.rs new file mode 100644 index 00000000000..2e8a740f893 --- /dev/null +++ b/src/test/compile-fail/issue-39122.rs @@ -0,0 +1,13 @@ +// Copyright 2017 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. + +type Foo<T: std::ops::Add> = T; //~ WARNING E0122 + +type Bar<T> where T: std::ops::Add = T; //~ WARNING E0122 diff --git a/src/test/compile-fail/private-in-public-warn.rs b/src/test/compile-fail/private-in-public-warn.rs index 3496348985d..92d96595fd7 100644 --- a/src/test/compile-fail/private-in-public-warn.rs +++ b/src/test/compile-fail/private-in-public-warn.rs @@ -89,6 +89,7 @@ mod traits_where { pub type Alias<T> where T: PrivTr = T; //~^ ERROR private trait `traits_where::PrivTr` in public interface //~| WARNING hard error + //~| WARNING E0122 pub trait Tr2<T> where T: PrivTr {} //~^ ERROR private trait `traits_where::PrivTr` in public interface //~| WARNING hard error |
