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