error[E0405]: cannot find trait `Nonexist` in this scope --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:1:8 | LL | fn f isize>(x: F) {} | ^^^^^^^^ not found in this scope error[E0404]: expected trait, found type alias `Typedef` --> $DIR/unboxed-closure-sugar-nonexistent-trait.rs:6:8 | LL | fn g isize>(x: F) {} | ^^^^^^^^^^^^^^^^^^^^^^^ type aliases cannot be used as traits | = note: did you mean to use a trait alias? error: aborting due to 2 previous errors Some errors have detailed explanations: E0404, E0405. For more information about an error, try `rustc --explain E0404`.