File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for #80779.
2+
3+ pub struct T < ' a > ( & ' a str ) ;
4+
5+ pub fn f < ' a > ( val : T < ' a > ) -> _ {
6+ //~^ ERROR: the type placeholder `_` is not allowed within types on item signatures
7+ g ( val)
8+ }
9+
10+ pub fn g ( _: T < ' static > ) -> _ { }
11+ //~^ ERROR: the type placeholder `_` is not allowed within types on item signatures
12+
13+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
2+ --> $DIR/issue-80779.rs:10:28
3+ |
4+ LL | pub fn g(_: T<'static>) -> _ {}
5+ | ^
6+ | |
7+ | not allowed in type signatures
8+ | help: replace with the correct return type: `()`
9+
10+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
11+ --> $DIR/issue-80779.rs:5:29
12+ |
13+ LL | pub fn f<'a>(val: T<'a>) -> _ {
14+ | ^
15+ | |
16+ | not allowed in type signatures
17+ | help: replace with the correct return type: `()`
18+
19+ error: aborting due to 2 previous errors
20+
21+ For more information about this error, try `rustc --explain E0121`.
You can’t perform that action at this time.
0 commit comments