about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-20 06:05:18 +0000
committerbors <bors@rust-lang.org>2024-07-20 06:05:18 +0000
commit41ff4608894d260462a7b6cf1ddefc6c8ecf6b1c (patch)
tree9b66204dfa9472432985dd330d3223a7b42b2593 /compiler/rustc_parse/src/errors.rs
parent9057c3ffec44926d5e149dc13ff3ce1613b69cce (diff)
parent2b089147ab0c08afa3275488a318d80f9feb2448 (diff)
downloadrust-41ff4608894d260462a7b6cf1ddefc6c8ecf6b1c.tar.gz
rust-41ff4608894d260462a7b6cf1ddefc6c8ecf6b1c.zip
Auto merge of #127003 - GrigorenkoPV:107975, r=SparrowLii
Add a test for #107975

The int is zero. But also not zero. This is so much fun.

This is a part of #105107.

Initially I was going to just rebase #108445, but quite a few things changed since then:
* The [mcve](https://github.com/rust-lang/rust/issues/105787#issuecomment-1750112388) used for #105787 got fixed.[^upd2]
* You can't just `a ?= b` for #107975 anymore. Now you have to `a-b ?= 0`. This is what this PR does. As an additional flex, it show that three ways of converting a pointer to its address have this issue:
  1. `as usize`
  2. `.expose_provenance()`
  3. `.addr()`
* #108425 simply got fixed. Yay.

As an aside, the naming for `addr_of!` is quite unfortunate in context of provenance APIs. Because `addr_of!` gives you a pointer, but what provenance APIs refer to as "address" is the `usize` value. Oh well.

UPD1: GitHub is incapable of parsing #107975 in the PR name, so let's add it here.

[^upd2]: UPD2: [The other mcve](https://github.com/rust-lang/rust/issues/105787#issue-1500501670) does not work anymore either, saying "this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details."
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions