summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/trivial_impl4.rs
blob: 518f159c1fb65b378081f28ff6056f239644260c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Check that we don't break orphan rules.
//! The dependency may add an impl for `u8` later,
//! which would break this crate. We want to avoid adding
//! more ways in which adding an impl can be a breaking change.
//! This test differs from `trivial_impl3` because there actually
//! exists any impl for `Trait`, which has an effect on coherence.

// aux-build:trivial4.rs

extern crate trivial4;

pub trait Foo {
    fn foo()
    where
        Self: trivial4::Trait;
}

impl Foo for u8 {}
//~^ ERROR not all trait items implemented, missing: `foo`

fn main() {}