File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,9 @@ impl ops::Not for Cfg {
209
209
210
210
impl ops:: BitAndAssign for Cfg {
211
211
fn bitand_assign ( & mut self , other : Cfg ) {
212
+ if * self == other {
213
+ return ;
214
+ }
212
215
match ( self , other) {
213
216
( & mut Cfg :: False , _) | ( _, Cfg :: True ) => { } ,
214
217
( s, Cfg :: False ) => * s = Cfg :: False ,
@@ -238,6 +241,9 @@ impl ops::BitAnd for Cfg {
238
241
239
242
impl ops:: BitOrAssign for Cfg {
240
243
fn bitor_assign ( & mut self , other : Cfg ) {
244
+ if * self == other {
245
+ return ;
246
+ }
241
247
match ( self , other) {
242
248
( & mut Cfg :: True , _) | ( _, Cfg :: False ) => { } ,
243
249
( s, Cfg :: True ) => * s = Cfg :: True ,
Original file line number Diff line number Diff line change
1
+ #![ crate_name = "foo" ]
2
+ #![ feature( doc_cfg) ]
3
+
4
+ // @has 'foo/index.html'
5
+ // @!has '-' '//*[@class="stab portability"]' 'feature="sync" and'
6
+ // @has '-' '//*[@class="stab portability"]' 'feature="sync"'
7
+ #[ doc( cfg( feature = "sync" ) ) ]
8
+ #[ doc( cfg( feature = "sync" ) ) ]
9
+ pub struct Foo ;
10
+
11
+ #[ doc( cfg( feature = "sync" ) ) ]
12
+ pub mod bar {
13
+ #[ doc( cfg( feature = "sync" ) ) ]
14
+ pub struct Bar ;
15
+ }
You can’t perform that action at this time.
0 commit comments