1 // Ensures #[unstable] functions without opting in the corresponding #![feature]
2 // will not break inference.
4 // aux-build:inference_unstable_iterator.rs
5 // aux-build:inference_unstable_itertools.rs
8 extern crate inference_unstable_iterator;
9 extern crate inference_unstable_itertools;
11 #[allow(unused_imports)]
12 use inference_unstable_iterator::IpuIterator;
13 use inference_unstable_itertools::IpuItertools;
16 assert_eq!('x'.ipu_flatten(), 1);
17 //~^ WARN an associated function with this name may be added to the standard library in the future
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
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