]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / issues / issue-50865-private-impl-trait / auxiliary / lib.rs
1 // revisions: default miropt
2 //[miropt]compile-flags: -Z mir-opt-level=3
3 // ~^ This flag is for #77668, it used to be ICE.
4
5 #![crate_type = "lib"]
6
7 pub fn bar<P>( // Error won't happen if "bar" is not generic
8 _baz: P,
9 ) {
10 hide_foo()();
11 }
12
13 fn hide_foo() -> impl Fn() { // Error won't happen if "iterate" hasn't impl Trait or has generics
14 foo
15 }
16
17 fn foo() { // Error won't happen if "foo" isn't used in "iterate" or has generics
18 }