]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs
Rollup merge of #100291 - WaffleLapkin:cstr_const_methods, r=oli-obk
[rust.git] / src / test / run-make-fulldeps / stable-symbol-names / stable-symbol-names1.rs
1 #![crate_type="rlib"]
2
3 pub trait Foo {
4   fn generic_method<T>();
5 }
6
7 pub struct Bar;
8
9 impl Foo for Bar {
10   fn generic_method<T>() {}
11 }
12
13 pub fn mono_function() {
14   Bar::generic_method::<Bar>();
15 }
16
17 pub fn mono_function_lifetime<'a>(x: &'a u64) -> u64 {
18   *x
19 }
20
21 pub fn generic_function<T>(t: T) -> T {
22   t
23 }
24
25 pub fn user() {
26   generic_function(0u32);
27   generic_function("abc");
28   let x = 2u64;
29   generic_function(&x);
30   let _ = mono_function_lifetime(&x);
31 }