]>
Commit | Line | Data |
---|---|---|
0531ce1d XL |
1 | // Ensures #[unstable] functions without opting in the corresponding #![feature] |
2 | // will not break inference. | |
3 | ||
4 | // aux-build:inference_unstable_iterator.rs | |
5 | // aux-build:inference_unstable_itertools.rs | |
6 | // run-pass | |
7 | ||
8 | extern crate inference_unstable_iterator; | |
9 | extern crate inference_unstable_itertools; | |
10 | ||
11 | #[allow(unused_imports)] | |
12 | use inference_unstable_iterator::IpuIterator; | |
13 | use inference_unstable_itertools::IpuItertools; | |
14 | ||
15 | fn main() { | |
16 | assert_eq!('x'.ipu_flatten(), 1); | |
6a06907d | 17 | //~^ WARN an associated function with this name may be added to the standard library in the future |
3c0e092e XL |
18 | //~| WARN once this associated item is added to the standard library, the ambiguity may cause an |
19 | assert_eq!('x'.ipu_by_value_vs_by_ref(), 1); | |
20 | //~^ WARN an associated function with this name may be added to the standard library in the future | |
21 | //~| WARN once this associated item is added to the standard library, the ambiguity may cause an | |
22 | assert_eq!('x'.ipu_by_ref_vs_by_ref_mut(), 1); | |
23 | //~^ WARN an associated function with this name may be added to the standard library in the future | |
24 | //~| WARN once this associated item is added to the standard library, the ambiguity may cause an | |
25 | assert_eq!((&mut 'x' as *mut char).ipu_by_mut_ptr_vs_by_const_ptr(), 1); | |
26 | //~^ WARN an associated function with this name may be added to the standard library in the future | |
6a06907d XL |
27 | //~| WARN once this associated item is added to the standard library, the ambiguity may cause an |
28 | assert_eq!(char::C, 1); | |
29 | //~^ WARN an associated constant with this name may be added to the standard library in the future | |
30 | //~| WARN once this associated item is added to the standard library, the ambiguity may cause an | |
0531ce1d | 31 | } |