File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for #81522.
2+ // Ensures that `#[allow(unstable_name_collisions)]` appended to things other than function
3+ // suppresses the corresponding diagnostics emitted from inside them.
4+ // But note that this attribute doesn't work for macro invocations if it is appended directly.
5+
6+ // aux-build:inference_unstable_iterator.rs
7+ // aux-build:inference_unstable_itertools.rs
8+ // run-pass
9+
10+ extern crate inference_unstable_iterator;
11+ extern crate inference_unstable_itertools;
12+
13+ #[ allow( unused_imports) ]
14+ use inference_unstable_iterator:: IpuIterator ;
15+ use inference_unstable_itertools:: IpuItertools ;
16+
17+ fn main ( ) {
18+ // expression statement
19+ #[ allow( unstable_name_collisions) ]
20+ 'x' . ipu_flatten ( ) ;
21+
22+ // let statement
23+ #[ allow( unstable_name_collisions) ]
24+ let _ = 'x' . ipu_flatten ( ) ;
25+
26+ // block expression
27+ #[ allow( unstable_name_collisions) ]
28+ {
29+ 'x' . ipu_flatten ( ) ;
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments