diff options
| author | Michael Goulet <michael@errs.io> | 2022-07-21 22:00:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-08-16 00:59:06 +0000 |
| commit | fd934c99bcf1a930ef44a27129ef24b323d3c54f (patch) | |
| tree | d9b3906d9c0b43f00807efc1cc7563e259893011 /src/test/ui/error-codes | |
| parent | 40336865fe7d4a01139a3336639c6971647e885c (diff) | |
| download | rust-fd934c99bcf1a930ef44a27129ef24b323d3c54f.tar.gz rust-fd934c99bcf1a930ef44a27129ef24b323d3c54f.zip | |
Do not allow Drop impl on foreign fundamental types
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0117.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0117.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0120.stderr | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/error-codes/E0117.rs b/src/test/ui/error-codes/E0117.rs index 22b48657385..406d24e3666 100644 --- a/src/test/ui/error-codes/E0117.rs +++ b/src/test/ui/error-codes/E0117.rs @@ -1,4 +1,4 @@ impl Drop for u32 {} //~ ERROR E0117 -//~| ERROR the `Drop` trait may only be implemented for structs, enums, and unions +//~| ERROR the `Drop` trait may only be implemented for local structs, enums, and unions fn main() {} diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 76d9f5cc0e5..f144aa9f72c 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -9,11 +9,11 @@ LL | impl Drop for u32 {} | = note: define and implement a trait or new type instead -error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions +error[E0120]: the `Drop` trait may only be implemented for local structs, enums, and unions --> $DIR/E0117.rs:1:15 | LL | impl Drop for u32 {} - | ^^^ must be a struct, enum, or union + | ^^^ must be a struct, enum, or union in the current crate error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr index 6c306455e42..75778f1f94a 100644 --- a/src/test/ui/error-codes/E0120.stderr +++ b/src/test/ui/error-codes/E0120.stderr @@ -1,8 +1,8 @@ -error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions +error[E0120]: the `Drop` trait may only be implemented for local structs, enums, and unions --> $DIR/E0120.rs:3:15 | LL | impl Drop for dyn MyTrait { - | ^^^^^^^^^^^ must be a struct, enum, or union + | ^^^^^^^^^^^ must be a struct, enum, or union in the current crate error: aborting due to previous error |
