Skip to content

Commit

Permalink
Add #[must_use] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Aug 6, 2024
1 parent 17a2f6b commit 0848b78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/salsa-macro-rules/src/setup_input_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ macro_rules! setup_input_struct {
// because $Configuration can't be named in `builder`.
impl builder::$Builder {
/// Creates the new input with the set values.
#[must_use]
pub fn new<$Db>(self, db: &$Db) -> $Struct
where
// FIXME(rust-lang/rust#65991): The `db` argument *should* have the type `dyn Database`
Expand Down Expand Up @@ -261,6 +262,7 @@ macro_rules! setup_input_struct {
(builder.fields, stamps)
}

#[must_use]
pub struct $Builder {
/// The field values.
fields: ($($field_ty,)*),
Expand Down

0 comments on commit 0848b78

Please sign in to comment.