1 #![feature(negative_impls)]
3 // aux-build: foreign_trait.rs
5 // Test that we cannot implement `LocalTrait` for `String`,
6 // even though there is a `String: !ForeignTrait` impl.
8 // This may not be the behavior we want long term, but it's the
9 // current semantics that we implemented so as to land `!Foo` impls
10 // quickly. See internals thread:
12 // https://internals.rust-lang.org/t/foo/11587/
14 extern crate foreign_trait;
15 use foreign_trait::ForeignTrait;
18 impl<T: ForeignTrait> LocalTrait for T { }
19 impl LocalTrait for String { } //~ ERROR conflicting implementations