tests: add regression test for #74614
This commit adds a regression test for #74614 so that it is fixed before polymorphisation is re-enabled. Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
parent
f39ed207fe
commit
799d52eff7
17
src/test/ui/issues/issue-74614.rs
Normal file
17
src/test/ui/issues/issue-74614.rs
Normal file
@ -0,0 +1,17 @@
|
||||
// build-pass
|
||||
|
||||
fn test<T>() {
|
||||
std::mem::size_of::<T>();
|
||||
}
|
||||
|
||||
pub fn foo<T>(_: T) -> &'static fn() {
|
||||
&(test::<T> as fn())
|
||||
}
|
||||
|
||||
fn outer<T>() {
|
||||
foo(|| ());
|
||||
}
|
||||
|
||||
fn main() {
|
||||
outer::<u8>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user