summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/trait-or-new-type-instead.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/traits/trait-or-new-type-instead.rs')
-rw-r--r--src/test/ui/traits/trait-or-new-type-instead.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/traits/trait-or-new-type-instead.rs b/src/test/ui/traits/trait-or-new-type-instead.rs
new file mode 100644
index 000000000..572b03efc
--- /dev/null
+++ b/src/test/ui/traits/trait-or-new-type-instead.rs
@@ -0,0 +1,6 @@
+impl<T> Option<T> {
+//~^ ERROR cannot define inherent `impl` for a type outside of the crate where the type is defined
+ pub fn foo(&self) { }
+}
+
+fn main() { }