Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Dec 19, 2013

I actually suspect the function shouldn't be written in this particular way, so I'd like some commentary. (This function is not used by anything yet, but I'm working on better error messages so it will come in handy for another patch)

Signed-off-by: Edward Z. Yang ezyang@cs.stanford.edu

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
@alexcrichton
Copy link
Member

Interesting! This patch itself seems useful in some contexts, but I would want to see it used somewhere in the compiler before committing it. I agree that the failure messages aren't quite up to par with what they should be, and this should likely have the Session passed in for usage with the session's span_fatal or just fatal message (if you don't have a span).

For now though, the bors queue is quite long, and I want to try to keep it a little smaller than we have been. I would be totally fine accepting this in a the patch which uses this method, but until that time I don't think it's worth it to have a separate pull request for it.

I'm very curious to see how much this helps other portions of the compiler!

flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 16, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 16, 2023
…-null, r=llogiq

fix(ptr_as_ptr): handle `std::ptr::null{_mut}`

close rust-lang#11066
close rust-lang#11665
close rust-lang#11911

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: [`ptr_as_ptr`]: handle `std::ptr::null` and `std::ptr::null_mut`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants