Skip to content

Commit

Permalink
Update minimum derive_utils version to 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jun 25, 2019
1 parent 7eed84d commit 12fdcb4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* Added some generated code examples.

* Updated minimum `derive_utils` version to 0.8.0. This improves the error message.

# 0.5.8 - 2019-05-22

* Added support for `futures::io::{AsyncSeek, AsyncBufRead}`.
Expand Down
2 changes: 1 addition & 1 deletion derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ travis-ci = { repository = "taiki-e/auto_enums" }
proc-macro = true

[dependencies]
derive_utils = { version = "0.7.2" }
derive_utils = { version = "0.8.0" }
lazy_static = "1.2"
proc-macro2 = "0.4.13"
quote = "0.6.8"
Expand Down
8 changes: 8 additions & 0 deletions test_suite/compile-test/tests/ui/enum_derive/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ enum Enum6<A> {
B(A, B),
}

#[enum_derive(Clone)]
enum Enum7<A> {
A(A),
}

#[enum_derive(Clone)]
enum Enum8 {}

fn main() {}
16 changes: 15 additions & 1 deletion test_suite/compile-test/tests/ui/enum_derive/variant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,19 @@ error: a variant with multiple fields is not supported
34 | B(A, B),
| ^^^^^^

error: aborting due to 5 previous errors
error: cannot be implemented for enums with less than two variants
--> $DIR/variant.rs:38:1
|
38 | / enum Enum7<A> {
39 | | A(A),
40 | | }
| |_^

error: cannot be implemented for enums with less than two variants
--> $DIR/variant.rs:43:1
|
43 | enum Enum8 {}
| ^^^^^^^^^^^^^

error: aborting due to 7 previous errors

3 changes: 2 additions & 1 deletion test_suite/compile-test/tests/ui/update-all-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
# See all `update-references.sh`, if you just want to update a single test.

MY_DIR="$(dirname "${BASH_SOURCE[0]}")"
MY_DIR=$(dirname $0)
cd $MY_DIR
find . -name '*.rs' | xargs ./update-references.sh
cd -
2 changes: 1 addition & 1 deletion test_suite/compile-test/tests/ui/update-references.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# If you find yourself manually editing a foo.stderr file, you're
# doing it wrong.

MYDIR="$(dirname "${BASH_SOURCE[0]}")"
MYDIR=$(dirname $0)

BUILD_DIR="../../../../target/tests/ui"

Expand Down

0 comments on commit 12fdcb4

Please sign in to comment.