Skip to content

Commit

Permalink
page-tracking: Remove static lifetime on DeRef in PageBox
Browse files Browse the repository at this point in the history
See: rust-lang/rust#105572
Trait implementations adding more restrictive constrains to a trait
definition will soon be an error.

Luckily, it doesn't seem that this 'static lifetime bound is needed by
`PageBox` so remove it to make newer versions of rust happy.

Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
  • Loading branch information
dgreid authored and abrestic-rivos committed Jan 3, 2023
1 parent 7e74e3f commit a527413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion page-tracking/src/collections/page_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<T> Clone for StaticPageRef<T> {
impl<T> Deref for StaticPageRef<T> {
type Target = T;

fn deref(&self) -> &'static T {
fn deref(&self) -> &T {
// Safe because this pointer is guaranteed to be valid in the constructor.
unsafe { self.0.as_ref() }
}
Expand Down

0 comments on commit a527413

Please sign in to comment.