]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-105226.rs
Rollup merge of #106919 - compiler-errors:underscore-typo-in-field-pat, r=jackh726
[rust.git] / tests / ui / suggestions / issue-105226.rs
1 use std::fmt;
2
3 struct S {
4 }
5
6 impl S {
7     fn hello<P>(&self, val: &P) where P: fmt::Display; {
8         //~^ ERROR non-item in item list
9         //~| ERROR associated function in `impl` without body
10         println!("val: {}", val);
11     }
12 }
13
14 impl S {
15     fn hello_empty<P>(&self, val: &P) where P: fmt::Display;
16     //~^ ERROR associated function in `impl` without body
17 }
18
19 fn main() {
20     let s = S{};
21     s.hello(&32);
22 }