Skip to content

Commit

Permalink
Auto merge of rust-lang#132190 - matthiaskrgr:rollup-rsocfiz, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#131875 (Add WASM | WASI | Emscripten groups to triagebot.toml)
 - rust-lang#132019 (Document `PartialEq` impl for `OnceLock`)
 - rust-lang#132182 (Downgrade `untranslatable_diagnostic` and `diagnostic_outside_of_impl` to `allow`)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Oct 26, 2024
2 parents 4d88de2 + 5dd6010 commit 9b18a12
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_lint/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 20 additions & 0 deletions library/std/src/sync/once_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
37 changes: 37 additions & 0 deletions triagebot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 9b18a12

Please sign in to comment.