diff options
| author | Gianni Ciccarelli <gianni.ciccarelli@gmail.com> | 2017-11-21 07:27:20 +0000 |
|---|---|---|
| committer | Gianni Ciccarelli <gianni.ciccarelli@gmail.com> | 2018-02-07 18:31:39 +0000 |
| commit | b20bfb1fc283ae3b0c4f3d712919f4fc3522517b (patch) | |
| tree | c910e34ab7db3d436a0d65ed4a1d57e57af9fa01 /src/test/compile-fail/specialization/defaultimpl | |
| parent | 13e80af159a709e5bb9a178b19b4319716261661 (diff) | |
support `default impl` for specialization
not skipping any wfchecks on default impls
Diffstat (limited to 'src/test/compile-fail/specialization/defaultimpl')
| -rw-r--r-- | src/test/compile-fail/specialization/defaultimpl/specialization-wfcheck.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/specialization/defaultimpl/specialization-wfcheck.rs b/src/test/compile-fail/specialization/defaultimpl/specialization-wfcheck.rs new file mode 100644 index 00000000000..5f6844d0c82 --- /dev/null +++ b/src/test/compile-fail/specialization/defaultimpl/specialization-wfcheck.rs @@ -0,0 +1,18 @@ +// 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. + +#![feature(specialization)] + +trait Foo<'a, T: Eq + 'a> { } + +default impl<U> Foo<'static, U> for () {} +//~^ ERROR the trait bound `U: std::cmp::Eq` is not satisfied + +fn main(){} \ No newline at end of file |
