Skip to content

Update to Rust nightly of 2026-03-01#176

Merged
arthurp merged 4 commits intomainfrom
arthurp/update-rustc
Mar 11, 2026
Merged

Update to Rust nightly of 2026-03-01#176
arthurp merged 4 commits intomainfrom
arthurp/update-rustc

Conversation

@arthurp
Copy link
Copy Markdown
Contributor

@arthurp arthurp commented Mar 4, 2026

This will provide access to newer features if required and simply avoid falling too far behind.

This disables warnings instead of fixing them when possible to keep the PR simple. However, some things must be updated for one reason or another:

  • Remove use of format_args_nl
  • Remove unsafe that is not needed.
  • Remove feature flags that are now in stable
  • Remove unsafe when there is no unsafe calls
  • Update calls to unstable functions that changed
  • Add a few expect attributes for things that we do not want to ignore globally.
  • Remove an unnecessary and no longer valid impl.

These changes are unlikely to conflict with outstanding work.

This will be followed by PRs to reenable warnings and fix the code that triggered them. I already have many of the changes, I just realized a separate PR was better.

@arthurp arthurp changed the title Update to Rust night of 2026-03-01 Update to Rust nightly of 2026-03-01 Mar 4, 2026
@arthurp arthurp force-pushed the arthurp/update-rustc branch from 34fae96 to 059cd3d Compare March 4, 2026 19:06
@arthurp arthurp marked this pull request as ready for review March 4, 2026 21:29
@arthurp arthurp requested a review from a team as a code owner March 4, 2026 21:29
@arthurp arthurp requested review from aanyas72 and tewaro March 5, 2026 04:57
@arthurp
Copy link
Copy Markdown
Contributor Author

arthurp commented Mar 5, 2026

@aanyas72 I added you because you might be interested and getting exposed to this kind of logistics is useful because no one teaches this and it is important.

arthurp added 3 commits March 5, 2026 11:33
This ignores all new warnins instead of trying to fix them.
* Remove use of format_args_nl
* Remove unsafe that is not needed.
* Remove feature flags that are now in stable
...
@arthurp arthurp force-pushed the arthurp/update-rustc branch from 51228ad to aa9a15d Compare March 5, 2026 17:35
Comment thread kernel/comps/logger/src/console.rs Outdated
};
($($arg:tt)*) => {{
$crate::_print(format_args_nl!($($arg)*));
$crate::_print(format_args!($($arg)*), true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the comment above about this being copied from rust's stdlib still true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know why you can no-longer access format_args_nl, but you can't. However based on rust-lang/rust#111060 (comment), format_args!("{}\n", format_args!($($arg)*)) has no overhead, so I'm using that instead.

.write()
.inode_cache
.extract_if(|_, inode| Arc::strong_count(inode) == 1)
.extract_if(.., |_, inode| Arc::strong_count(inode) == 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what does this syntax do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

.. is the unbounded range, so this call operates over the entire collection. I don't know why extract_if would take a range, while other functions don't. drain also takes one. I'm not sure why.

@arthurp arthurp merged commit 3bc2be6 into main Mar 11, 2026
22 checks passed
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