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 {
209209
210210impl ops:: BitAndAssign for Cfg {
211211 fn bitand_assign ( & mut self , other : Cfg ) {
212+ if * self == other {
213+ return ;
214+ }
212215 match ( self , other) {
213216 ( & mut Cfg :: False , _) | ( _, Cfg :: True ) => { } ,
214217 ( s, Cfg :: False ) => * s = Cfg :: False ,
@@ -238,6 +241,9 @@ impl ops::BitAnd for Cfg {
238241
239242impl ops:: BitOrAssign for Cfg {
240243 fn bitor_assign ( & mut self , other : Cfg ) {
244+ if * self == other {
245+ return ;
246+ }
241247 match ( self , other) {
242248 ( & mut Cfg :: True , _) | ( _, Cfg :: False ) => { } ,
243249 ( 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