Skip to content

Commit

Permalink
allocative: impl Allocative for TypeId
Browse files Browse the repository at this point in the history
Summary: Need it next diff

Reviewed By: dtolnay

Differential Revision: D53114425

fbshipit-source-id: 6fbeb107e46c4247b1bb44451fb20c0f3dc7be67
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Jan 26, 2024
1 parent 1f2fe80 commit ab7de1c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions allocative/allocative/src/impls/std/any.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under both the MIT license found in the
* LICENSE-MIT file in the root directory of this source tree and the Apache
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory
* of this source tree.
*/

use crate::allocative_trait::Allocative;
use crate::visitor::Visitor;

impl Allocative for std::any::TypeId {
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
visitor.visit_simple_sized::<Self>();
}
}
1 change: 1 addition & 0 deletions allocative/allocative/src/impls/std/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* of this source tree.
*/

mod any;
mod cell;
mod collections;
mod function;
Expand Down

0 comments on commit ab7de1c

Please sign in to comment.