Fix if branch in op.rs#155043
Conversation
|
Failed to set assignee to
|
|
This restores the old behavior, but I'm also curious why the relevant code should not run for AssignOp's. |
| if by_ref_binop { | ||
| if let ty::Ref(_, _, mutbl) = method.sig.inputs()[1].kind() { |
There was a problem hiding this comment.
Remark: this condition itself seems a bit fishy, what's even more fishy is that zero tests are failing with or without this condition 🤔
There was a problem hiding this comment.
matches!(op, Op::AssignOp(_)) but not by_ref_binop 🤔
|
@rustbot reroll |
|
Okay, this condition adds an autoref adjustment to the RHS type of comparison operators. It doesn't get catched by test suites probably because ref impl and value impl usually have the same return type. @malezjaa, could you add a test case for this? r? @adwinwhite |
|
It does seems fishy. Let's land the fix first and think about regression test (or the condition's validity) later without worrying about unexpected breakages. I have no time to look into it right now. @bors r+ rollup |
…adwinwhite Fix if branch in op.rs I removed the if guard without thinking in rust-lang#154223. Really sorry about this. r? @hkBst
…adwinwhite Fix if branch in op.rs I removed the if guard without thinking in rust-lang#154223. Really sorry about this. r? @hkBst
Rollup of 10 pull requests Successful merges: - #154973 (Break a single query cycle in the deadlock handler) - #155034 (Implement `GenericTypeVisitable` for some types) - #151377 (Fix linker error by resolving regions for main return type obligations) - #154677 (hwaddress: automatically add `-Ctarget-feature=+tagged-globals`) - #154774 (Add myself as co-maintainer for hexagon-unknown-linux-musl) - #155015 (Add tests for three fixed issues (an LLVM crash, an ICE and poor codegen)) - #155039 (minor follow up to removing soft mode `#[unstable]`) - #155043 (Fix if branch in op.rs) - #155071 (Deny `#[global_allocator]` + `#[thread_local]`) - #155072 (Set the Fuchsia ABI to the documented minimum)
I removed the if guard without thinking in #154223. Really sorry about this.
r? @hkBst