Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rust 1.74 #102

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# always build this using the latest stable release
FROM rust:1.71.0 as build
FROM rust:1.74.1 as build


ARG JQ_VERSION=1.6
@@ -41,7 +41,7 @@ RUN cargo generate-lockfile && cargo local-registry --sync Cargo.lock .
# version tag with a nightly one, pinned to a specific date.

# official Dockerfile source:
# https://github.com/rust-lang/docker-rust/blob/master/1.71.0/bookworm/slim/Dockerfile
# https://github.com/rust-lang/docker-rust/blob/master/1.74.1/bookworm/slim/Dockerfile

################ start-copy-pasta ################

@@ -50,7 +50,7 @@ FROM debian:bookworm-slim
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=nightly-2023-07-18
RUST_VERSION=nightly-2023-12-12
# ~~~~~~~~^~~~~~~~~~
# pin version here

28 changes: 14 additions & 14 deletions tests/example-all-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -6,72 +6,72 @@
{
"name": "Any old year",
"status": "fail",
"message": "thread 'test_any_old_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_any_old_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Century",
"status": "fail",
"message": "thread 'test_century' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_century' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Early years",
"status": "fail",
"message": "thread 'test_early_years' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_early_years' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Exceptional centuries",
"status": "fail",
"message": "thread 'test_exceptional_centuries' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_exceptional_centuries' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 100 but not by 3 is still not a leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Year divisible by 100 not divisible by 400 common year",
"status": "fail",
"message": "thread 'test_year_divisible_by_100_not_divisible_by_400_common_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_100_not_divisible_by_400_common_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Year divisible by 2 not divisible by 4 in common year",
"status": "fail",
"message": "thread 'test_year_divisible_by_2_not_divisible_by_4_in_common_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_2_not_divisible_by_4_in_common_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Year divisible by 200 not divisible by 400 common year",
"status": "fail",
"message": "thread 'test_year_divisible_by_200_not_divisible_by_400_common_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_200_not_divisible_by_400_common_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Year divisible by 4 and 5 is still a leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_4_and_5_is_still_a_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_4_and_5_is_still_a_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 4 not divisible by 100 leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_4_not_divisible_by_100_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_4_not_divisible_by_100_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 400 but not by 125 is still a leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_400_but_not_by_125_is_still_a_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_400_but_not_by_125_is_still_a_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 400 leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_400_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_400_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year not divisible by 4 common year",
"status": "fail",
"message": "thread 'test_year_not_divisible_by_4_common_year' panicked at 'assertion failed: `(left == right)`\n left: `true`,\n right: `false`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_not_divisible_by_4_common_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: true\n right: false\n"
},
{
"name": "Years 1600 to 1699",
"status": "fail",
"message": "thread 'test_years_1600_to_1699' panicked at 'incorrect result for years: [1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699]', tests/leap.rs:98:9\n"
"message": "thread 'test_years_1600_to_1699' panicked at tests/leap.rs:98:9:\nincorrect result for years: [1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699]\n"
}
]
}
10 changes: 5 additions & 5 deletions tests/example-partial-fail/expected_results.json
Original file line number Diff line number Diff line change
@@ -16,12 +16,12 @@
{
"name": "Early years",
"status": "fail",
"message": "thread 'test_early_years' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_early_years' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Exceptional centuries",
"status": "fail",
"message": "thread 'test_exceptional_centuries' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_exceptional_centuries' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 100 but not by 3 is still not a leap year",
@@ -56,12 +56,12 @@
{
"name": "Year divisible by 400 but not by 125 is still a leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_400_but_not_by_125_is_still_a_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_400_but_not_by_125_is_still_a_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year divisible by 400 leap year",
"status": "fail",
"message": "thread 'test_year_divisible_by_400_leap_year' panicked at 'assertion failed: `(left == right)`\n left: `false`,\n right: `true`', tests/leap.rs:2:5\n"
"message": "thread 'test_year_divisible_by_400_leap_year' panicked at tests/leap.rs:2:5:\nassertion `left == right` failed\n left: false\n right: true\n"
},
{
"name": "Year not divisible by 4 common year",
@@ -71,7 +71,7 @@
{
"name": "Years 1600 to 1699",
"status": "fail",
"message": "thread 'test_years_1600_to_1699' panicked at 'incorrect result for years: [1600]', tests/leap.rs:98:9\n"
"message": "thread 'test_years_1600_to_1699' panicked at tests/leap.rs:98:9:\nincorrect result for years: [1600]\n"
}
]
}
2 changes: 1 addition & 1 deletion tests/example-syntax-error/expected_results.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"status": "error",
"message": " Compiling leap v1.6.0 (example-syntax-error)\nerror: visibility `pub` is not followed by an item\n --> src/lib.rs:1:1\n |\n1 | pub fnnnqwe is_leap_year(!$^2year: u64)\n | ^^^ the visibility\n |\n = help: you likely meant to define an item, e.g., `pub fn foo() {}`\n\nerror: expected item, found `fnnnqwe`\n --> src/lib.rs:1:5\n |\n1 | pub fnnnqwe is_leap_year(!$^2year: u64)\n | ^^^^^^^ expected item\n\nerror: could not compile `leap` due to 2 previous errors\n
"message": " Compiling leap v1.6.0 (example-syntax-error)\nerror: visibility `pub` is not followed by an item\n --> src/lib.rs:1:1\n |\n1 | pub fnnnqwe is_leap_year(!$^2year: u64)\n | ^^^ the visibility\n |\n = help: you likely meant to define an item, e.g., `pub fn foo() {}`\n\nerror: expected item, found `fnnnqwe`\n --> src/lib.rs:1:5\n |\n1 | pub fnnnqwe is_leap_year(!$^2year: u64)\n | ^^^^^^^ expected item\n |\n = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>\n\nerror: could not compile `leap` due to 2 previous errors\n
}
2 changes: 1 addition & 1 deletion tests/example-user-output/expected_results.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
{
"name": "Is five",
"status": "fail",
"message": "thread 'is_five' panicked at 'assertion failed: `(left == right)`\n left: `4`,\n right: `5`', tests/two_plus_two.rs:10:5\n",
"message": "thread 'is_five' panicked at tests/two_plus_two.rs:10:5:\nassertion `left == right` failed\n left: 4\n right: 5\n",
"output": "I am here...\n"
},
{