Skip to content

Commit

Permalink
Bump static_assertions dependency to 1.1 (#34)
Browse files Browse the repository at this point in the history
* Bump static_assertions dependency to 1.1

* bump MSRV to 1.37 to match static_assertions 1.1

* fix tests affected by static_assertions breaking changes

* and the no features tests

Co-authored-by: Jane Lusby <[email protected]>
  • Loading branch information
davide125 and yaahc authored Oct 5, 2021
1 parent dbe1360 commit 0b90859
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
rust:
- stable
- 1.36.0
- 1.37.0
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
Expand All @@ -33,7 +33,7 @@ jobs:
rust:
- stable
- nightly
- 1.36.0
- 1.37.0
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
Expand All @@ -55,7 +55,7 @@ jobs:
matrix:
rust:
- stable
- 1.36.0
- 1.37.0
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ proc-macro2 = "1.0"

[dev-dependencies]
trybuild = "1.0"
static_assertions = "0.3.4"
static_assertions = "1.1"
libc = { version = "0.2", default-features = false }
rustversion = "1.0.0"
pretty_assertions = "0.6.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/no_std/enum_prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
2 changes: 1 addition & 1 deletion tests/no_std/enum_prefix_missing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
12 changes: 6 additions & 6 deletions tests/no_std/enum_prefix_missing.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ error: proc-macro derive panicked
= help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself.

error[E0277]: `TestType` doesn't implement `Display`
--> $DIR/enum_prefix_missing.rs:32:44
--> $DIR/enum_prefix_missing.rs:32:37
|
32 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `TestType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/enum_prefix_missing.rs:32:1
|
32 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion tests/no_std/multi_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
12 changes: 6 additions & 6 deletions tests/no_std/multi_line.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ error: proc-macro derive panicked
= help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive.

error[E0277]: `TestType` doesn't implement `Display`
--> $DIR/multi_line.rs:34:44
--> $DIR/multi_line.rs:34:37
|
34 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `TestType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/multi_line.rs:34:1
|
34 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion tests/no_std/multi_line_allow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
2 changes: 1 addition & 1 deletion tests/no_std/with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ use displaydoc::Display;
#[derive(Display)]
struct FakeType;

static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
static_assertions::assert_impl_all!(FakeType: core::fmt::Display);
2 changes: 1 addition & 1 deletion tests/no_std/without.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use displaydoc::Display;
/// this type is pretty swell
struct FakeType;

static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
static_assertions::assert_impl_all!(FakeType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
12 changes: 6 additions & 6 deletions tests/no_std/without.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ warning: unused import: `displaydoc::Display`
= note: `#[warn(unused_imports)]` on by default

error[E0277]: `FakeType` doesn't implement `Display`
--> $DIR/without.rs:25:44
--> $DIR/without.rs:25:37
|
25 | static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
| ^^^^^^^^ `FakeType` cannot be formatted with the default formatter
25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display);
| ^^^^^^^^ `FakeType` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `FakeType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/without.rs:25:1
|
25 | static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion tests/std/enum_prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
2 changes: 1 addition & 1 deletion tests/std/enum_prefix_missing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
12 changes: 6 additions & 6 deletions tests/std/enum_prefix_missing.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ error: proc-macro derive panicked
= help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself.

error[E0277]: `TestType` doesn't implement `std::fmt::Display`
--> $DIR/enum_prefix_missing.rs:32:44
--> $DIR/enum_prefix_missing.rs:32:37
|
32 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `TestType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/enum_prefix_missing.rs:32:1
|
32 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
12 changes: 6 additions & 6 deletions tests/std/multi_line.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ error: proc-macro derive panicked
= help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive.

error[E0277]: `TestType` doesn't implement `std::fmt::Display`
--> $DIR/multi_line.rs:34:44
--> $DIR/multi_line.rs:34:37
|
34 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^ `TestType` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `TestType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/multi_line.rs:34:1
|
34 | static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 1 addition & 1 deletion tests/std/multi_line_allow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum TestType {
Variant2,
}

static_assertions::assert_impl_all!(label; TestType, core::fmt::Display);
static_assertions::assert_impl_all!(TestType: core::fmt::Display);

#[cfg(feature = "std")]
fn main() {}
4 changes: 2 additions & 2 deletions tests/std/multiple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ use displaydoc::Display;
#[derive(Display)]
struct FakeType;

static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
static_assertions::assert_impl_all!(FakeType: core::fmt::Display);

/// this type is pretty swell2
#[derive(Display)]
struct FakeType2;

static_assertions::assert_impl_all!(label2; FakeType2, core::fmt::Display);
static_assertions::assert_impl_all!(FakeType2: core::fmt::Display);
12 changes: 6 additions & 6 deletions tests/std/without.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ warning: unused import: `displaydoc::Display`
= note: `#[warn(unused_imports)]` on by default

error[E0277]: `FakeType` doesn't implement `std::fmt::Display`
--> $DIR/without.rs:25:44
--> $DIR/without.rs:25:37
|
25 | static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
| ^^^^^^^^ `FakeType` cannot be formatted with the default formatter
25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display);
| ^^^^^^^^ `FakeType` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `FakeType`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `assert_impl_all`
--> $DIR/without.rs:25:1
|
25 | static_assertions::assert_impl_all!(label; FakeType, core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `_assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)
25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)

0 comments on commit 0b90859

Please sign in to comment.