Skip to content

Conversation

@ratmice
Copy link
Collaborator

@ratmice ratmice commented Mar 12, 2025

Also rewrite the cache info variable accessors to be more fragile. When done in the let Self{ ... } = self; style, this code should now cause errors and lints as new fields get added.

The comment I added mirrors the one in the struct decl but be more local to where the above fragility will happen.

// Record the time that this version of lrpar was built. If the source code changes and
// rustc forces a recompile, this will change this value, causing anything which depends on
// this build of lrpar to be recompiled too.
let Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a very clever idiom!

@ltratt ltratt added this pull request to the merge queue Mar 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2025
@ratmice
Copy link
Collaborator Author

ratmice commented Mar 12, 2025

Should be fixed, by rustfmt but will need a squash.

@ltratt
Copy link
Member

ltratt commented Mar 12, 2025

Please squash.

Rewrite the cache info variable accessors to be more fragile.
When done in the `let Self{ ... } = self;` style, this code
should now cause errors and lints as new fields get added.
@ratmice ratmice force-pushed the cache_error_flags branch from 1d5c9c4 to 005b54f Compare March 12, 2025 17:20
@ratmice
Copy link
Collaborator Author

ratmice commented Mar 12, 2025

Squashed.

@ltratt ltratt added this pull request to the merge queue Mar 12, 2025
Merged via the queue into softdevteam:master with commit 4e5b298 Mar 12, 2025
2 checks passed
@ratmice ratmice deleted the cache_error_flags branch March 14, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants