1 // aux-build:type_dependent_lib.rs
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6 #![cfg_attr(min, feature(min_const_generics))]
8 extern crate type_dependent_lib;
10 use type_dependent_lib::*;
13 let s = Struct::<42>::new();
14 assert_eq!(s.same_ty::<7>(), (42, 7));
15 assert_eq!(s.different_ty::<19>(), (42, 19));
16 assert_eq!(Struct::<1337>::new().different_ty::<96>(), (1337, 96));
19 .we_have_to_go_deeper::<19>()
20 .containing_ty::<Option<u32>, 3>(),
24 let s = Struct::<7>::new();
25 assert_eq!(s.foo::<18>(), 18);