Skip to content

Commit ac461cc

Browse files
committed
fix(utils): remove extra braces to work around a compiler bug
This commit implements a work-around for this issue: <rust-lang/rust#73120>
1 parent 23b3ef4 commit ac461cc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/constance/src/utils.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//!
33
//! **This module is exempt from the API stability guarantee** unless specified
44
//! otherwise. It's exposed only because it's needed by macros.
5-
// FIXME: Work-around for `rust-analyzer` denying `false` in generic parameters
6-
#![allow(unused_braces)]
75
use core::marker::PhantomData;
86

97
/// Conditional type
@@ -33,9 +31,9 @@ pub trait TypeFn {
3331
#[doc(hidden)]
3432
pub struct Conditional<T, F, const B: bool>(PhantomData<(T, F)>);
3533

36-
impl<T, F> TypeFn for Conditional<T, F, { false }> {
34+
impl<T, F> TypeFn for Conditional<T, F, false> {
3735
type Output = F;
3836
}
39-
impl<T, F> TypeFn for Conditional<T, F, { true }> {
37+
impl<T, F> TypeFn for Conditional<T, F, true> {
4038
type Output = T;
4139
}

0 commit comments

Comments
 (0)