about summary refs log tree commit diff
path: root/tests/ui/unstable-feature-bound/unstable_impl_coherence.rs
blob: 22100f85f715b0825a8e6a6c2725f146a873f9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ aux-build:unstable_impl_coherence_aux.rs
//@ revisions: enabled disabled

#![cfg_attr(enabled, feature(foo))]
extern crate unstable_impl_coherence_aux as aux;
use aux::Trait;

/// Coherence test for unstable impl.
/// No matter feature `foo` is enabled or not, the impl
/// for aux::Trait will be rejected by coherence checking.

struct LocalTy;

impl aux::Trait for LocalTy {}
//~^ ERROR: conflicting implementations of trait `Trait` for type `LocalTy`

fn main(){}