From 904d0aa272daf6921422aa3c501467db511155c5 Mon Sep 17 00:00:00 2001 From: Perry Kundert Date: Wed, 9 Dec 2020 12:53:23 -0800 Subject: [PATCH] Update rand, correct some compiletest_rs changes due to Rust version --- examples/game-loop/main.rs | 2 +- sm/Cargo.toml | 4 ++-- sm/tests/compile-fail/undefined-event.rs | 2 +- sm/tests/compile-fail/undefined-transition.rs | 2 +- test_suite/Cargo.toml | 2 +- test_suite/tests/compile-fail/macros/sm/invalid-transition.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/game-loop/main.rs b/examples/game-loop/main.rs index 45776d1..45463f0 100644 --- a/examples/game-loop/main.rs +++ b/examples/game-loop/main.rs @@ -108,7 +108,7 @@ struct TestTunables { // A random number generator, used to generate numbers between the above // min/max configurations. - rng: rand::ThreadRng, + rng: rand::rngs::ThreadRng, } fn main() { diff --git a/sm/Cargo.toml b/sm/Cargo.toml index 8a8ef75..cc5a305 100644 --- a/sm/Cargo.toml +++ b/sm/Cargo.toml @@ -15,9 +15,9 @@ edition = "2018" sm_macro = { version = "1.0", path = "../sm_macro", optional = true } [dev-dependencies] -compiletest_rs = { version = "0.3", features = [ "stable" ] } +compiletest_rs = { version = "*" } criterion = "0.3" -rand = "0.5" +rand = "0.7" sm_macro = { version = "1.0", path = "../sm_macro" } [features] diff --git a/sm/tests/compile-fail/undefined-event.rs b/sm/tests/compile-fail/undefined-event.rs index c0633d7..98fcfb0 100644 --- a/sm/tests/compile-fail/undefined-event.rs +++ b/sm/tests/compile-fail/undefined-event.rs @@ -15,5 +15,5 @@ fn main() { sm.transition(Invalid); //~^ ERROR cannot find value `Invalid` in this scope - //~| ERROR no method named `transition` found for type `Lock::Machine` in the current scope + //~| ERROR no method named `transition` found for struct `Lock::Machine` in the current scope } diff --git a/sm/tests/compile-fail/undefined-transition.rs b/sm/tests/compile-fail/undefined-transition.rs index 1d3e2e5..c1de31c 100644 --- a/sm/tests/compile-fail/undefined-transition.rs +++ b/sm/tests/compile-fail/undefined-transition.rs @@ -16,5 +16,5 @@ fn main() { let sm = Machine::new(Unlocked); sm.transition(TurnKey); - //~^ ERROR no method named `transition` found for type `Lock::Machine` in the current scope + //~^ ERROR no method named `transition` found for struct `Lock::Machine` in the current scope } diff --git a/test_suite/Cargo.toml b/test_suite/Cargo.toml index 37c385f..82af785 100644 --- a/test_suite/Cargo.toml +++ b/test_suite/Cargo.toml @@ -10,4 +10,4 @@ sm = { path = "../sm" } sm_macro = { path = "../sm_macro" } [dependencies] -compiletest_rs = { version = "0.3", features = [ "stable" ] } +compiletest_rs = { version = "*" } diff --git a/test_suite/tests/compile-fail/macros/sm/invalid-transition.rs b/test_suite/tests/compile-fail/macros/sm/invalid-transition.rs index 8df08e3..1216981 100644 --- a/test_suite/tests/compile-fail/macros/sm/invalid-transition.rs +++ b/test_suite/tests/compile-fail/macros/sm/invalid-transition.rs @@ -14,5 +14,5 @@ fn main() { let sm = Machine::new(Unlocked); sm = sm.transition(TurnKey); - //~^ ERROR no method named `transition` found for type `Lock::Machine` in the current scope + //~^ ERROR no method named `transition` found for struct `Lock::Machine` in the current scope }