diff options
| author | Gianni Ciccarelli <gianni.ciccarelli@gmail.com> | 2017-04-24 09:56:54 +0000 |
|---|---|---|
| committer | Gianni Ciccarelli <gianni.ciccarelli@gmail.com> | 2017-04-25 05:28:22 +0000 |
| commit | 715811d0be05dcdc55b44f97d9fd2cd1eb7eee05 (patch) | |
| tree | c893a210beed2ccc862c0154255461010915c50b /src/test/compile-fail/specialization | |
| parent | b0fca5f790e86a4235c64095f4ac55d325253b92 (diff) | |
| download | rust-715811d0be05dcdc55b44f97d9fd2cd1eb7eee05.tar.gz rust-715811d0be05dcdc55b44f97d9fd2cd1eb7eee05.zip | |
support `default impl` for specialization
pr review
Diffstat (limited to 'src/test/compile-fail/specialization')
| -rw-r--r-- | src/test/compile-fail/specialization/defaultimpl/specialization-no-default-trait-implementations.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/specialization/defaultimpl/specialization-no-default-trait-implementations.rs b/src/test/compile-fail/specialization/defaultimpl/specialization-no-default-trait-implementations.rs new file mode 100644 index 00000000000..c1746d765dd --- /dev/null +++ b/src/test/compile-fail/specialization/defaultimpl/specialization-no-default-trait-implementations.rs @@ -0,0 +1,19 @@ +// 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)] +#![feature(optin_builtin_traits)] + +trait Foo {} + +default impl Foo for .. {} +//~^ ERROR `default impl` is not allowed for default trait implementations + +fn main() {} |
