Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ mut_mut = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_collect = "warn"
needless_continue = "warn"
needless_for_each = "warn"
negative_feature_names = "warn"
no_effect_underscore_binding = "warn"
Expand Down Expand Up @@ -125,7 +124,7 @@ transmute_ptr_to_ptr = "warn"
transmute_undefined_repr = "warn"
try_err = "warn"
type_repetition_in_bounds = "warn"
unchecked_duration_subtraction = "warn"
unchecked_time_subtraction = "warn"
unicode_not_nfc = "warn"
unnecessary_join = "warn"
unnecessary_self_imports = "warn"
Expand Down
4 changes: 4 additions & 0 deletions bon-macros/src/builder/builder_gen/member/config/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This lint occurs in code generated by `darling::FromAttributes`.
// TODO: report/fix this in `darling` upstream.
#![allow(clippy::needless_continue)]

mod blanket;
mod getter;
mod setters;
Expand Down
15 changes: 13 additions & 2 deletions bon/tests/integration/ui/compile_fail/attr_derive.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,13 @@ error[E0277]: the trait bound `StructContainsNonTrait: Clone` is not satisfied
--> tests/integration/ui/compile_fail/attr_derive.rs:38:6
|
38 | impl StructContainsNonTrait {
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `StructContainsNonTrait`
| ^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Clone` is not implemented for `StructContainsNonTrait`
--> tests/integration/ui/compile_fail/attr_derive.rs:7:1
|
7 | struct StructContainsNonTrait {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `NoTraitImpls: Clone` is not satisfied
--> tests/integration/ui/compile_fail/attr_derive.rs:43:49
Expand Down Expand Up @@ -425,8 +431,13 @@ error[E0277]: `StructContainsNonTrait` doesn't implement `Debug`
--> tests/integration/ui/compile_fail/attr_derive.rs:38:6
|
38 | impl StructContainsNonTrait {
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `StructContainsNonTrait`
| ^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Debug` is not implemented for `StructContainsNonTrait`
--> tests/integration/ui/compile_fail/attr_derive.rs:7:1
|
7 | struct StructContainsNonTrait {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: add `#[derive(Debug)]` to `StructContainsNonTrait` or manually `impl Debug for StructContainsNonTrait`
note: required by a bound in `as_dyn_debug`
--> src/__/better_errors.rs
Expand Down
3 changes: 0 additions & 3 deletions bon/tests/integration/ui/compile_fail/attr_getter.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ error[E0277]: the member `Unset<negative_test_builder::members::x1>` was not set
| ^^^^^^ the member `Unset<negative_test_builder::members::x1>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<negative_test_builder::members::x1>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required by a bound in `NegativeTestBuilder::<S>::get_x1`
--> tests/integration/ui/compile_fail/attr_getter.rs:21:10
|
Expand All @@ -215,7 +214,6 @@ error[E0277]: the member `Unset<negative_test_builder::members::x2>` was not set
| ^^^^^^ the member `Unset<negative_test_builder::members::x2>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<negative_test_builder::members::x2>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required by a bound in `NegativeTestBuilder::<S>::get_x2`
--> tests/integration/ui/compile_fail/attr_getter.rs:21:10
|
Expand All @@ -233,7 +231,6 @@ error[E0277]: the member `Unset<negative_test_builder::members::x3>` was not set
| ^^^^^^ the member `Unset<negative_test_builder::members::x3>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<negative_test_builder::members::x3>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required by a bound in `NegativeTestBuilder::<S>::get_x3`
--> tests/integration/ui/compile_fail/attr_getter.rs:21:10
|
Expand Down
5 changes: 2 additions & 3 deletions bon/tests/integration/ui/compile_fail/attr_required.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ error: `skip` attribute can't be specified together with `required`
23 | #[builder(skip, required)]
| ^^^^

error[E0599]: no method named `maybe_member` found for struct `ValidBuilder` in the current scope
error[E0599]: no method named `maybe_member` found for struct `ValidBuilder<S>` in the current scope
--> tests/integration/ui/compile_fail/attr_required.rs:38:30
|
27 | #[derive(Builder)]
Expand All @@ -37,7 +37,7 @@ help: there is a method `member` with a similar name
38 + let _ = Valid::builder().member(Some(42));
|

error[E0599]: no method named `maybe_some_member` found for struct `ValidBuilder` in the current scope
error[E0599]: no method named `maybe_some_member` found for struct `ValidBuilder<S>` in the current scope
--> tests/integration/ui/compile_fail/attr_required.rs:39:30
|
27 | #[derive(Builder)]
Expand All @@ -59,7 +59,6 @@ error[E0277]: the member `Unset<arg1>` was not set, but this method requires it
| ^^^^^ the member `Unset<arg1>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<arg1>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required for `sut_builder::Empty` to implement `sut_builder::IsComplete`
--> tests/integration/ui/compile_fail/attr_required.rs:45:18
|
Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/ui/compile_fail/attr_skip.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ error: `skip` attribute is not supported on function arguments; use a local vari
26 | fn skip_on_fn_is_unsupporetd3(#[builder(skip = vec![42])] _z: Vec<u32>) {}
| ^^^^

error[E0599]: no method named `x` found for struct `SkipGeneratesNoSetterBuilder` in the current scope
error[E0599]: no method named `x` found for struct `SkipGeneratesNoSetterBuilder<S>` in the current scope
--> tests/integration/ui/compile_fail/attr_skip.rs:38:38
|
29 | #[derive(Builder)]
Expand All @@ -43,7 +43,7 @@ error[E0599]: no method named `x` found for struct `SkipGeneratesNoSetterBuilder
38 | SkipGeneratesNoSetter::builder().x(42).build();
| ^ method not found in `SkipGeneratesNoSetterBuilder`

error[E0599]: no method named `y` found for struct `SkipGeneratesNoSetterBuilder` in the current scope
error[E0599]: no method named `y` found for struct `SkipGeneratesNoSetterBuilder<S>` in the current scope
--> tests/integration/ui/compile_fail/attr_skip.rs:39:38
|
29 | #[derive(Builder)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ error[E0277]: the member `Unset<y>` was not set, but this method requires it to
| ^^^^^ the member `Unset<y>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<y>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required for `SetX` to implement `IsComplete`
--> tests/integration/ui/compile_fail/diagnostic_on_unimplemented.rs:4:14
|
Expand All @@ -27,7 +26,6 @@ error[E0277]: the member `Unset<renamed>` was not set, but this method requires
| ^^^^^ the member `Unset<renamed>` was not set, but this method requires it to be set
|
= help: the trait `IsSet` is not implemented for `Unset<renamed>`
= help: the trait `IsSet` is implemented for `Set<Name>`
note: required for `SetX` to implement `IsComplete`
--> tests/integration/ui/compile_fail/diagnostic_on_unimplemented.rs:4:14
|
Expand All @@ -49,7 +47,6 @@ error[E0277]: the member `Set<y>` was already set, but this method requires it t
| ^ the member `Set<y>` was already set, but this method requires it to be unset
|
= help: the trait `IsUnset` is not implemented for `Set<y>`
= help: the trait `IsUnset` is implemented for `Unset<Name>`
note: required by a bound in `ExampleBuilder::<S>::y`
--> tests/integration/ui/compile_fail/diagnostic_on_unimplemented.rs:4:14
|
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"devDependencies": {
"prettier": "^3.6.2"
"prettier": "^3.7.4"
}
}
6 changes: 4 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[toolchain]
channel = "1.90.0"
components = ["cargo"]
channel = "1.92.0"
# rust-src is required for consistently generating test snapshots with
# `trybuild` that contain snippets of code from the standard library.
components = ["cargo", "rust-src"]
Loading