fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1-include ../tools.mk 2 3# Test to make sure that inner functions within a polymorphic outer function 4# don't get re-codegened when the outer function is monomorphized. The test 5# code monomorphizes the outer functions several times, but the magic constants 6# used in the inner functions should each appear only once in the generated IR. 7 8all: 9 $(RUSTC) foo.rs --emit=llvm-ir 10 [ "$$(grep -c 'ret i32 8675309' "$(TMPDIR)/foo.ll")" -eq "1" ] 11 [ "$$(grep -c 'ret i32 11235813' "$(TMPDIR)/foo.ll")" -eq "1" ]