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 2, 2024
1 parent 805760d commit 766341f
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 @@ -143,6 +143,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 @@ -259,6 +260,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 766341f

Please sign in to comment.