-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify #[derive(Dupe)] generated code
Summary: Put `assert_dupe` into crate rather than generating it for each type where `Dupe` is derived. This should make compilation tiny bit faster. Reviewed By: JakobDegen Differential Revision: D56122611 fbshipit-source-id: ea97858d38d3af75114ca570e6cbad41d4c80467
- Loading branch information
1 parent
83245b3
commit 3337cc7
Showing
4 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#![doc(hidden)] | ||
|
||
use crate::Dupe; | ||
|
||
#[inline] | ||
pub const fn assert_dupe<T: Dupe + ?Sized>() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
|
||
//! A cheap version of [`Clone`]. | ||
|
||
pub mod __macro_refs; | ||
pub(crate) mod iter; | ||
pub(crate) mod option; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters