- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Strict Provenance MVP #95241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strict Provenance MVP #95241
Changes from all commits
5167b68
              c7de289
              6864360
              09395f6
              b608df8
              31e1cde
              7514d76
              9efcd99
              5f720fa
              28576e9
              378ed25
              075c576
              a91a9ee
              37d4753
              e3a3afe
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -2115,13 +2115,12 @@ impl<T> Weak<T> { | |
| #[rustc_const_unstable(feature = "const_weak_new", issue = "95091", reason = "recently added")] | ||
| #[must_use] | ||
| pub const fn new() -> Weak<T> { | ||
| Weak { ptr: unsafe { NonNull::new_unchecked(usize::MAX as *mut RcBox<T>) } } | ||
| Weak { ptr: unsafe { NonNull::new_unchecked(ptr::invalid_mut::<RcBox<T>>(usize::MAX)) } } | ||
| } | ||
| } | ||
|  | ||
| pub(crate) fn is_dangling<T: ?Sized>(ptr: *mut T) -> bool { | ||
| let address = ptr as *mut () as usize; | ||
| address == usize::MAX | ||
| (ptr as *mut ()).addr() == usize::MAX | ||
|          | ||
| } | ||
|  | ||
| /// Helper type to allow accessing the reference counts without | ||
|  | ||
Uh oh!
There was an error while loading. Please reload this page.