Skip to content

Commit

Permalink
Merge pull request #408 from KodrAus/chore/ci-fix
Browse files Browse the repository at this point in the history
Update stderr messages
  • Loading branch information
KodrAus authored Jun 16, 2024
2 parents 650025d + 70a8247 commit 9f633fe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 80 deletions.
10 changes: 5 additions & 5 deletions tests/compile-fail/bitflags_custom_bits.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `MyInt: bitflags::traits::Primitive` is not satisf
| ^^^^^ the trait `bitflags::traits::Primitive` is not implemented for `MyInt`
|
= help: the following other types implement trait `bitflags::traits::Primitive`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and $N others
note: required by a bound in `PublicFlags::Primitive`
--> src/traits.rs
Expand Down
78 changes: 20 additions & 58 deletions tests/compile-fail/bitflags_redefined.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -366,25 +366,6 @@ error[E0119]: conflicting implementations of trait `IntoIterator` for type `Flag
|
= note: this error originates in the macro `$crate::__impl_public_bitflags_iter` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
--> tests/compile-fail/bitflags_redefined.rs:4:1
|
4 | / bitflags! {
5 | | pub struct Flags1: u32 {
6 | | const A = 1;
7 | | }
8 | | }
| |_^ cannot infer type
|
note: the requirement `_ <: _` appears on the `impl`'s method `into_iter` but not on the corresponding trait's method
--> $RUST/core/src/iter/traits/collect.rs
|
= note: in this trait
::: $RUST/core/src/iter/traits/collect.rs
|
= note: this trait's method doesn't have the requirement `_ <: _`
= note: this error originates in the macro `$crate::__impl_public_bitflags_iter` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
--> tests/compile-fail/bitflags_redefined.rs:10:1
|
Expand All @@ -397,25 +378,6 @@ error[E0282]: type annotations needed
|
= note: this error originates in the macro `$crate::__declare_public_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
--> tests/compile-fail/bitflags_redefined.rs:10:1
|
10 | / bitflags! {
11 | | pub struct Flags1: u32 {
12 | | const A = 1;
13 | | }
14 | | }
| |_^ cannot infer type
|
note: the requirement `_ <: _` appears on the `impl`'s method `into_iter` but not on the corresponding trait's method
--> $RUST/core/src/iter/traits/collect.rs
|
= note: in this trait
::: $RUST/core/src/iter/traits/collect.rs
|
= note: this trait's method doesn't have the requirement `_ <: _`
= note: this error originates in the macro `$crate::__impl_public_bitflags_iter` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0592]: duplicate definitions with name `A`
--> tests/compile-fail/bitflags_redefined.rs:4:1
|
Expand Down Expand Up @@ -981,14 +943,14 @@ error[E0283]: type annotations needed
|
= note: cannot satisfy `_: WriteHex`
= help: the following types implement trait `WriteHex`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and $N others
note: required by a bound in `to_writer`
--> src/parser.rs
Expand All @@ -1012,14 +974,14 @@ error[E0283]: type annotations needed
|
= note: cannot satisfy `_: ParseHex`
= help: the following types implement trait `ParseHex`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and $N others
note: required by a bound in `bitflags::parser::from_str`
--> src/parser.rs
Expand Down Expand Up @@ -2191,14 +2153,14 @@ error[E0283]: type annotations needed
|
= note: cannot satisfy `_: WriteHex`
= help: the following types implement trait `WriteHex`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and $N others
note: required by a bound in `to_writer`
--> src/parser.rs
Expand All @@ -2222,14 +2184,14 @@ error[E0283]: type annotations needed
|
= note: cannot satisfy `_: ParseHex`
= help: the following types implement trait `ParseHex`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and $N others
note: required by a bound in `bitflags::parser::from_str`
--> src/parser.rs
Expand Down
17 changes: 0 additions & 17 deletions tests/compile-fail/unnamed_const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@ error[E0599]: no associated item named `_` found for struct `Unnamed` in the cur
9 | | }
| |_- associated item `_` not found for this struct
|
note: if you're trying to build a new `Unnamed` consider using one of the following associated functions:
_::<impl Unnamed>::empty
_::<impl Unnamed>::all
_::<impl Unnamed>::from_bits
_::<impl Unnamed>::from_bits_truncate
and $N others
--> tests/compile-fail/unnamed_const.rs:3:1
|
3 | / bitflags! {
4 | | pub struct Unnamed: u8 {
5 | | const _ = 1;
6 | |
7 | | const A = Self::_.bits();
8 | | }
9 | | }
| |_^
= note: this error originates in the macro `$crate::__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is an associated constant `A` with a similar name
|
7 | const A = Self::A.bits();
Expand Down

0 comments on commit 9f633fe

Please sign in to comment.