about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/json.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-19 15:12:36 +0200
committerGitHub <noreply@github.com>2020-04-19 15:12:36 +0200
commit4d11c3fe3065042c946cdb7e775ed999ab6f0031 (patch)
treed7d184d531cdb0635a320a6e547893d7860fd588 /src/test/rustdoc-ui/coverage/json.rs
parent36b1a9296cde2b773771710e9bbd608fd2eca35f (diff)
parentf4ded11b49aa24dcd8c0e114b427757b5d08dbe7 (diff)
downloadrust-4d11c3fe3065042c946cdb7e775ed999ab6f0031.tar.gz
rust-4d11c3fe3065042c946cdb7e775ed999ab6f0031.zip
Rollup merge of #71107 - vorner:weak-into-raw-dangling, r=Amanieu
Address concerns of weak-into-raw

This should address the standing concerns in https://github.com/rust-lang/rust/issues/60728#issuecomment-612525616.

I've still left the ability to create a new dangling pointer from `null`, as I feel like this is the natural behaviour to expect, but I'm fine removing that too. I've modified the documentation to allow the `as_ptr` or `into_ptr` to return whatever garbage in case of a dangling pointer. I've also removed the guarantee to be able to do `from_raw(as_ptr)` from the documentation (but it would still work right now).

I've renamed the method and added implementations for `Rc`/`Arc`.

I've also tried if I can just „enable“ unsized types. I believe the current interface is compatible with them. But the inner implementation will be a bit challenging ‒ I can't use the `data_offset` as is used by `Rc` or `Arc` because it AFAIK „touches“ (creates a reference to) the live value of `T` ‒ and in case of `Weak`, it might be completely bogus or already dead ‒ so that would be UB.

`./x.py test tidy` is completely mad on my own system all over the code base :-(. I'll just hope it goes through CI, or will fix as necessary.

Is it OK if I ask @Amanieu for review, as the concerns are from you?

~r @Amanieu
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions