Skip to content

Commit

Permalink
Merge pull request #192 from artichoke/lopopolo/nightly-breakage
Browse files Browse the repository at this point in the history
Address new `internal_features` warning on latest nightly
  • Loading branch information
lopopolo authored Dec 24, 2023
2 parents 7bc5536 + 1cbdaa9 commit c3b4213
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
},
{
"pattern": "^https://twitter.com/artichokeruby"
},
{
"pattern": "^https://www.reddit.com/r/rust/"
}
],
"replacementPatterns": [],
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "cactusref"
version = "0.4.0" # remember to set `html_root_url` in `src/lib.rs`.
version = "0.5.0" # remember to set `html_root_url` in `src/lib.rs`.
authors = ["Ryan Lopopolo <rjl@hyperbo.la>"]
license = "MIT"
edition = "2021"
rust-version = "1.56.0"
rust-version = "1.77.0"
readme = "README.md"
repository = "https://github.com/artichoke/cactusref"
documentation = "https://docs.rs/cactusref"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
cactusref = "0.4.0"
cactusref = "0.5.0"
```

CactusRef is mostly a drop-in replacement for `std::rc::Rc`, which can be used
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
slice_ptr_get
)]
#![allow(incomplete_features)]
#![allow(internal_features)]
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![warn(clippy::cargo)]
#![allow(clippy::cast_possible_wrap)]
#![allow(clippy::inline_always)]
#![allow(clippy::let_underscore_untyped)]
#![allow(clippy::manual_let_else)]
#![allow(clippy::missing_panics_doc)]
#![allow(clippy::option_if_let_else)]
#![allow(clippy::needless_pass_by_ref_mut)]
Expand Down Expand Up @@ -126,7 +128,7 @@
//! [`CoerceUnsized`]: core::ops::CoerceUnsized
//! [`DispatchFromDyn`]: core::ops::DispatchFromDyn

#![doc(html_root_url = "https://docs.rs/cactusref/0.4.0")]
#![doc(html_root_url = "https://docs.rs/cactusref/0.5.0")]
#![no_std]

// Ensure code blocks in README.md compile
Expand Down
5 changes: 3 additions & 2 deletions src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ use crate::link::Links;

#[cfg(test)]
#[allow(clippy::redundant_clone)]
#[allow(clippy::uninlined_format_args)]
mod tests;

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

// Copy value as bytes
ptr::copy_nonoverlapping(
(box_ptr as *const T).cast::<u8>(),
box_ptr.cast_const().cast::<u8>(),
ptr::addr_of_mut!((*ptr).value).cast::<u8>(),
value_size,
);
Expand Down Expand Up @@ -1507,7 +1508,7 @@ impl<T> Weak<T> {
pub unsafe fn from_raw(ptr: *const T) -> Self {
// See Weak::as_ptr for context on how the input pointer is derived.

let ptr = if is_dangling(ptr as *mut T) {
let ptr = if is_dangling(ptr.cast_mut()) {
// This is a dangling Weak.
ptr as *mut RcBox<T>
} else {
Expand Down

0 comments on commit c3b4213

Please sign in to comment.