summaryrefslogtreecommitdiffstats
path: root/tests/ui/incoherent-inherent-impls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/incoherent-inherent-impls')
-rw-r--r--tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.stderr78
-rw-r--r--tests/ui/incoherent-inherent-impls/no-attr-empty-impl.stderr12
2 files changed, 28 insertions, 62 deletions
diff --git a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.stderr b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.stderr
index 8f7082511..f5900afe2 100644
--- a/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.stderr
+++ b/tests/ui/incoherent-inherent-impls/needs-has-incoherent-impls.stderr
@@ -1,114 +1,80 @@
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:5:1
|
-LL | / impl extern_crate::StructWithAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::StructWithAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:7:5
|
LL | fn foo() {}
- | ^^^^^^^^^^^
+ | ^^^^^^^^
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:13:1
|
-LL | / impl extern_crate::StructNoAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::StructNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:13:1
|
-LL | / impl extern_crate::StructNoAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::StructNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:17:1
|
-LL | / impl extern_crate::StructNoAttr {
-LL | |
-LL | | #[rustc_allow_incoherent_impl]
-LL | | fn bar() {}
-LL | | }
- | |_^
+LL | impl extern_crate::StructNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:17:1
|
-LL | / impl extern_crate::StructNoAttr {
-LL | |
-LL | | #[rustc_allow_incoherent_impl]
-LL | | fn bar() {}
-LL | | }
- | |_^
+LL | impl extern_crate::StructNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:22:1
|
-LL | / impl extern_crate::EnumWithAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::EnumWithAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:24:5
|
LL | fn foo() {}
- | ^^^^^^^^^^^
+ | ^^^^^^^^
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:30:1
|
-LL | / impl extern_crate::EnumNoAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::EnumNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:30:1
|
-LL | / impl extern_crate::EnumNoAttr {
-LL | |
-LL | | fn foo() {}
-LL | | }
- | |_^
+LL | impl extern_crate::EnumNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0390]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/needs-has-incoherent-impls.rs:34:1
|
-LL | / impl extern_crate::EnumNoAttr {
-LL | |
-LL | | #[rustc_allow_incoherent_impl]
-LL | | fn bar() {}
-LL | | }
- | |_^
+LL | impl extern_crate::EnumNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider moving this inherent impl into the crate defining the type if possible
help: alternatively add `#[rustc_has_incoherent_inherent_impls]` to the type and `#[rustc_allow_incoherent_impl]` to the relevant impl items
--> $DIR/needs-has-incoherent-impls.rs:34:1
|
-LL | / impl extern_crate::EnumNoAttr {
-LL | |
-LL | | #[rustc_allow_incoherent_impl]
-LL | | fn bar() {}
-LL | | }
- | |_^
+LL | impl extern_crate::EnumNoAttr {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
diff --git a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.stderr b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.stderr
index b3f8b51d0..6dc1680cf 100644
--- a/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.stderr
+++ b/tests/ui/incoherent-inherent-impls/no-attr-empty-impl.stderr
@@ -2,7 +2,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate wher
--> $DIR/no-attr-empty-impl.rs:4:1
|
LL | impl extern_crate::StructWithAttr {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
|
= note: define and implement a trait or new type instead
@@ -10,7 +10,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate wher
--> $DIR/no-attr-empty-impl.rs:7:1
|
LL | impl extern_crate::StructNoAttr {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
|
= note: define and implement a trait or new type instead
@@ -18,7 +18,7 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate wher
--> $DIR/no-attr-empty-impl.rs:10:1
|
LL | impl extern_crate::EnumWithAttr {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
|
= note: define and implement a trait or new type instead
@@ -26,15 +26,15 @@ error[E0116]: cannot define inherent `impl` for a type outside of the crate wher
--> $DIR/no-attr-empty-impl.rs:13:1
|
LL | impl extern_crate::EnumNoAttr {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl for type defined outside of crate.
|
= note: define and implement a trait or new type instead
error[E0390]: cannot define inherent `impl` for primitive types
- --> $DIR/no-attr-empty-impl.rs:16:6
+ --> $DIR/no-attr-empty-impl.rs:16:1
|
LL | impl f32 {}
- | ^^^
+ | ^^^^^^^^
|
= help: consider using an extension trait instead