From 7bbf914078fe3124bc077ce4a52b793c93086c4d Mon Sep 17 00:00:00 2001 From: Alan Egerton <eggyal@gmail.com> Date: Fri, 10 Jun 2022 16:26:00 +0100 Subject: [PATCH 1/3] Clarify `#[derive(PartialEq)]` on enums Fixes #97945 --- library/core/src/cmp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index f281e8429c693..7884e302d983b 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -61,8 +61,8 @@ use self::Ordering::*; /// /// This trait can be used with `#[derive]`. When `derive`d on structs, two /// instances are equal if all fields are equal, and not equal if any fields -/// are not equal. When `derive`d on enums, each variant is equal to itself -/// and not equal to the other variants. +/// are not equal. When `derive`d on enums, two instances are equal if they +/// are the same variant and all fields are equal. /// /// ## How can I implement `PartialEq`? /// From 2f47edbf09561dce8628248d228abc2c240f4e57 Mon Sep 17 00:00:00 2001 From: bjorn3 <bjorn3@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:06:27 +0000 Subject: [PATCH 2/3] Fix some test annotations These are necessary for running the rustc test suite with cg_clif --- src/test/ui/asm/x86_64/issue-82869.rs | 1 + src/test/ui/asm/x86_64/issue-82869.stderr | 6 +++--- src/test/ui/drop/repeat-drop.rs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/ui/asm/x86_64/issue-82869.rs b/src/test/ui/asm/x86_64/issue-82869.rs index 3e632eaf88dda..67933666eb5d3 100644 --- a/src/test/ui/asm/x86_64/issue-82869.rs +++ b/src/test/ui/asm/x86_64/issue-82869.rs @@ -1,3 +1,4 @@ +// needs-asm-support // only-x86_64 // Make sure rustc doesn't ICE on asm! for a foreign architecture. diff --git a/src/test/ui/asm/x86_64/issue-82869.stderr b/src/test/ui/asm/x86_64/issue-82869.stderr index 42be1b6de725a..3cf9d6d1c1c00 100644 --- a/src/test/ui/asm/x86_64/issue-82869.stderr +++ b/src/test/ui/asm/x86_64/issue-82869.stderr @@ -1,17 +1,17 @@ error: invalid register class `vreg`: unknown register class - --> $DIR/issue-82869.rs:10:32 + --> $DIR/issue-82869.rs:11:32 | LL | asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") { | ^^^^^^^^^^^ error: invalid register class `vreg`: unknown register class - --> $DIR/issue-82869.rs:10:45 + --> $DIR/issue-82869.rs:11:45 | LL | asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") { | ^^^^^^^^^^ error: invalid register `d0`: unknown register - --> $DIR/issue-82869.rs:10:57 + --> $DIR/issue-82869.rs:11:57 | LL | asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") { | _________________________________________________________^ diff --git a/src/test/ui/drop/repeat-drop.rs b/src/test/ui/drop/repeat-drop.rs index 03e832adb3b3b..a43612e5d8587 100644 --- a/src/test/ui/drop/repeat-drop.rs +++ b/src/test/ui/drop/repeat-drop.rs @@ -1,4 +1,5 @@ // run-pass +// needs-unwind // ignore-wasm32-bare no unwinding panic // ignore-avr no unwinding panic // ignore-nvptx64 no unwinding panic From 99672fb2dc2f5d8e75ead3a2cf72792be6a0248f Mon Sep 17 00:00:00 2001 From: onlinesoftwaredevok <onlinesoftwaredevok@protonmail.com> Date: Sun, 12 Jun 2022 19:52:49 -0300 Subject: [PATCH 3/3] Add comment for internal error codes --- compiler/rustc_error_codes/src/error_codes.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes.rs b/compiler/rustc_error_codes/src/error_codes.rs index 0114461e38811..d507293ccb0d7 100644 --- a/compiler/rustc_error_codes/src/error_codes.rs +++ b/compiler/rustc_error_codes/src/error_codes.rs @@ -528,7 +528,7 @@ E0788: include_str!("./error_codes/E0788.md"), // E0190, // deprecated: can only cast a &-pointer to an &-object // E0194, // merged into E0403 // E0196, // cannot determine a type for this closure - E0208, + E0208, // internal error code // E0209, // builtin traits can only be implemented on structs or enums // E0213, // associated types are not accepted in this context // E0215, // angle-bracket notation is not stable with `Fn` @@ -633,14 +633,14 @@ E0788: include_str!("./error_codes/E0788.md"), // E0629, // missing 'feature' (rustc_const_unstable) // E0630, // rustc_const_unstable attribute must be paired with stable/unstable // attribute - E0640, // infer outlives requirements + E0640, // infer outlives requirements, internal error code // E0645, // trait aliases not finished // E0694, // an unknown tool name found in scoped attributes // E0702, // replaced with a generic attribute input check // E0707, // multiple elided lifetimes used in arguments of `async fn` // E0709, // multiple different lifetimes used in arguments of `async fn` - E0711, // a feature has been declared with conflicting stability attributes - E0717, // rustc_promotable without stability attribute + E0711, // a feature has been declared with conflicting stability attributes, internal error code + E0717, // rustc_promotable without stability attribute, internal error code // E0721, // `await` keyword // E0723, // unstable feature in `const` context // E0738, // Removed; errored on `#[track_caller] fn`s in `extern "Rust" { ... }`.