mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 20:34:06 +00:00
add UI test for #79605
This commit is contained in:
parent
67e273ba0e
commit
714c276b9c
6
tests/ui/generics/issue-79605.rs
Normal file
6
tests/ui/generics/issue-79605.rs
Normal file
@ -0,0 +1,6 @@
|
||||
struct X<'a, T>(&'a T);
|
||||
|
||||
impl X<'_, _> {}
|
||||
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations
|
||||
|
||||
fn main() {}
|
14
tests/ui/generics/issue-79605.stderr
Normal file
14
tests/ui/generics/issue-79605.stderr
Normal file
@ -0,0 +1,14 @@
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
|
||||
--> $DIR/issue-79605.rs:3:12
|
||||
|
|
||||
LL | impl X<'_, _> {}
|
||||
| ^ not allowed in type signatures
|
||||
|
|
||||
help: use type parameters instead
|
||||
|
|
||||
LL | impl<T> X<'_, T> {}
|
||||
| +++ ~
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0121`.
|
Loading…
Reference in New Issue
Block a user