We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Add
1 parent 58ba7c6 commit 9d9e19aCopy full SHA for 9d9e19a
core/src/ops/arith.rs
@@ -73,6 +73,7 @@
73
append_const_msg
74
)]
75
#[doc(alias = "+")]
76
+#[const_trait]
77
pub trait Add<Rhs = Self> {
78
/// The resulting type after applying the `+` operator.
79
#[stable(feature = "rust1", since = "1.0.0")]
@@ -94,7 +95,8 @@ pub trait Add<Rhs = Self> {
94
95
macro_rules! add_impl {
96
($($t:ty)*) => ($(
97
- impl Add for $t {
98
+ #[rustc_const_unstable(feature = "const_ops", issue = "90080")]
99
+ impl const Add for $t {
100
type Output = $t;
101
102
#[inline]
0 commit comments