Skip to content

Commit c3b4213

Browse files
authored
Merge pull request #192 from artichoke/lopopolo/nightly-breakage
Address new `internal_features` warning on latest nightly
2 parents 7bc5536 + 1cbdaa9 commit c3b4213

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/markdown-link-check.json

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
},
66
{
77
"pattern": "^https://twitter.com/artichokeruby"
8+
},
9+
{
10+
"pattern": "^https://www.reddit.com/r/rust/"
811
}
912
],
1013
"replacementPatterns": [],

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "cactusref"
3-
version = "0.4.0" # remember to set `html_root_url` in `src/lib.rs`.
3+
version = "0.5.0" # remember to set `html_root_url` in `src/lib.rs`.
44
authors = ["Ryan Lopopolo <[email protected]>"]
55
license = "MIT"
66
edition = "2021"
7-
rust-version = "1.56.0"
7+
rust-version = "1.77.0"
88
readme = "README.md"
99
repository = "https://github.com/artichoke/cactusref"
1010
documentation = "https://docs.rs/cactusref"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Add this to your `Cargo.toml`:
5252

5353
```toml
5454
[dependencies]
55-
cactusref = "0.4.0"
55+
cactusref = "0.5.0"
5656
```
5757

5858
CactusRef is mostly a drop-in replacement for `std::rc::Rc`, which can be used

src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
slice_ptr_get
88
)]
99
#![allow(incomplete_features)]
10+
#![allow(internal_features)]
1011
#![warn(clippy::all)]
1112
#![warn(clippy::pedantic)]
1213
#![warn(clippy::cargo)]
1314
#![allow(clippy::cast_possible_wrap)]
1415
#![allow(clippy::inline_always)]
1516
#![allow(clippy::let_underscore_untyped)]
17+
#![allow(clippy::manual_let_else)]
1618
#![allow(clippy::missing_panics_doc)]
1719
#![allow(clippy::option_if_let_else)]
1820
#![allow(clippy::needless_pass_by_ref_mut)]
@@ -126,7 +128,7 @@
126128
//! [`CoerceUnsized`]: core::ops::CoerceUnsized
127129
//! [`DispatchFromDyn`]: core::ops::DispatchFromDyn
128130
129-
#![doc(html_root_url = "https://docs.rs/cactusref/0.4.0")]
131+
#![doc(html_root_url = "https://docs.rs/cactusref/0.5.0")]
130132
#![no_std]
131133

132134
// Ensure code blocks in README.md compile

src/rc.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ use crate::link::Links;
261261

262262
#[cfg(test)]
263263
#[allow(clippy::redundant_clone)]
264+
#[allow(clippy::uninlined_format_args)]
264265
mod tests;
265266

266267
// This is repr(C) to future-proof against possible field-reordering, which
@@ -1005,7 +1006,7 @@ impl<T> Rc<T> {
10051006

10061007
// Copy value as bytes
10071008
ptr::copy_nonoverlapping(
1008-
(box_ptr as *const T).cast::<u8>(),
1009+
box_ptr.cast_const().cast::<u8>(),
10091010
ptr::addr_of_mut!((*ptr).value).cast::<u8>(),
10101011
value_size,
10111012
);
@@ -1507,7 +1508,7 @@ impl<T> Weak<T> {
15071508
pub unsafe fn from_raw(ptr: *const T) -> Self {
15081509
// See Weak::as_ptr for context on how the input pointer is derived.
15091510

1510-
let ptr = if is_dangling(ptr as *mut T) {
1511+
let ptr = if is_dangling(ptr.cast_mut()) {
15111512
// This is a dangling Weak.
15121513
ptr as *mut RcBox<T>
15131514
} else {

0 commit comments

Comments
 (0)