-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 4 pull requests #90437
Rollup of 4 pull requests #90437
Conversation
instead of through the Drop impl for Handler
Restructure std::rt (part 2) A couple more cleanups on top of rust-lang#89011 Blocked on rust-lang#89011
…, r=joshtriplett Add #[must_use] to len and is_empty Parent issue: rust-lang#89692 r? `@joshtriplett`
… r=joshtriplett Add #[must_use] to remaining std functions (A-N) I've run out of compelling reasons to group functions together across crates so I'm just going to go module-by-module. This is half of the remaining items from the `std` crate, from A-N. I added these functions myself. Clippy predictably ignored the `mut` ones, but I don't know why the rest weren't flagged. Check them closely, please? Maybe I overlooked good reasons. ```rust std::backtrace::Backtrace const fn disabled() -> Backtrace; std::backtrace::Backtrace<'a> fn frames(&'a self) -> &'a [BacktraceFrame]; std::collections::hash_map::RawOccupiedEntryMut<'a, K, V> fn key_mut(&mut self) -> &mut K; std::collections::hash_map::RawOccupiedEntryMut<'a, K, V> fn get_mut(&mut self) -> &mut V; std::collections::hash_map::RawOccupiedEntryMut<'a, K, V> fn get_key_value(&mut self) -> (&K, &V); std::collections::hash_map::RawOccupiedEntryMut<'a, K, V> fn get_key_value_mut(&mut self) -> (&mut K, &mut V); std::env fn var_os<K: AsRef<OsStr>>(key: K) -> Option<OsString>; std::env fn split_paths<T: AsRef<OsStr> + ?Sized>(unparsed: &T) -> SplitPaths<'_>; std::io::Error fn get_mut(&mut self) -> Option<&mut (dyn error::Error + Send + Sync + 'static)>; ``` Parent issue: rust-lang#89692 r? `@joshtriplett`
… r=joshtriplett Add #[must_use] to remaining std functions (O-Z) I've run out of compelling reasons to group functions together across crates so I'm just going to go module-by-module. This is half of the remaining items from the `std` crate, from O-Z. `panicking::take_hook` has a side effect: it unregisters the current panic hook, returning it. I almost ignored it, but the documentation example shows `let _ = panic::take_hook();`, so following suit I went ahead and added a `#[must_use]`. ```rust std::panicking fn take_hook() -> Box<dyn Fn(&PanicInfo<'_>) + 'static + Sync + Send>; ``` I added these functions that clippy did not flag: ```rust std::path::Path fn starts_with<P: AsRef<Path>>(&self, base: P) -> bool; std::path::Path fn ends_with<P: AsRef<Path>>(&self, child: P) -> bool; std::path::Path fn with_file_name<S: AsRef<OsStr>>(&self, file_name: S) -> PathBuf; std::path::Path fn with_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf; ``` Parent issue: rust-lang#89692 r? `@joshtriplett`
@bors r+ p=4 rollup=never |
📌 Commit 455a79a has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (68b554e): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup