diff options
| -rw-r--r-- | compiler/rustc_lint/src/internal.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sync/once_lock.rs | 20 | ||||
| -rw-r--r-- | triagebot.toml | 37 |
3 files changed, 59 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index 7dec6dbdc05..2f338f42f19 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -427,7 +427,7 @@ declare_tool_lint! { /// More details on translatable diagnostics can be found /// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/translation.html). pub rustc::UNTRANSLATABLE_DIAGNOSTIC, - Deny, + Allow, "prevent creation of diagnostics which cannot be translated", report_in_external_macro: true, @eval_always = true @@ -441,7 +441,7 @@ declare_tool_lint! { /// More details on diagnostics implementations can be found /// [here](https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html). pub rustc::DIAGNOSTIC_OUTSIDE_OF_IMPL, - Deny, + Allow, "prevent diagnostic creation outside of `Diagnostic`/`Subdiagnostic`/`LintDiagnostic` impls", report_in_external_macro: true, @eval_always = true diff --git a/library/std/src/sync/once_lock.rs b/library/std/src/sync/once_lock.rs index be615a5a8ef..0ae3cf4df36 100644 --- a/library/std/src/sync/once_lock.rs +++ b/library/std/src/sync/once_lock.rs @@ -634,6 +634,26 @@ impl<T> From<T> for OnceLock<T> { #[stable(feature = "once_cell", since = "1.70.0")] impl<T: PartialEq> PartialEq for OnceLock<T> { + /// Equality for two `OnceLock`s. + /// + /// Two `OnceLock`s are equal if they either both contain values and their + /// values are equal, or if neither contains a value. + /// + /// # Examples + /// + /// ``` + /// use std::sync::OnceLock; + /// + /// let five = OnceLock::new(); + /// five.set(5).unwrap(); + /// + /// let also_five = OnceLock::new(); + /// also_five.set(5).unwrap(); + /// + /// assert!(five == also_five); + /// + /// assert!(OnceLock::<u32>::new() == OnceLock::<u32>::new()); + /// ``` #[inline] fn eq(&self, other: &OnceLock<T>) -> bool { self.get() == other.get() diff --git a/triagebot.toml b/triagebot.toml index 17ce4cf32a2..2e8851e7ec2 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -135,6 +135,43 @@ In case it's useful, here are some [instructions] for tackling these sorts of is """ label = "O-rfl" +[ping.wasm] +alias = ["webassembly"] +message = """\ +Hey WASM notification group! This issue or PR could use some WebAssembly-specific +guidance. Could one of you weigh in? Thanks <3 + +(In case it's useful, here are some [instructions] for tackling these sorts of +issues). + +[instructions]: https://rustc-dev-guide.rust-lang.org/notification-groups/wasm.html +""" +label = "O-wasm" + +[ping.wasi] +message = """\ +Hey WASI notification group! This issue or PR could use some WASI-specific guidance. +Could one of you weigh in? Thanks <3 + +(In case it's useful, here are some [instructions] for tackling these sorts of +issues). + +[instructions]: https://rustc-dev-guide.rust-lang.org/notification-groups/wasi.html +""" +label = "O-wasi" + +[ping.emscripten] +message = """\ +Hey Emscripten notification group! This issue or PR could use some Emscripten-specific +guidance. Could one of you weigh in? Thanks <3 + +(In case it's useful, here are some [instructions] for tackling these sorts of +issues). + +[instructions]: https://rustc-dev-guide.rust-lang.org/notification-groups/emscripten.html +""" +label = "O-emscripten" + [prioritize] label = "I-prioritize" |
