diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-06 17:45:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 17:45:22 -0700 |
| commit | e74ab50d07a8b21e8d03ebfb0da8dae6583b1e67 (patch) | |
| tree | 168e729a30abda7528a52c811ea689fc14ed8f5e /src/test/ui/error-codes/E0642.fixed | |
| parent | 7942d9a65a1100c840c7d55172c7e9588066719d (diff) | |
| parent | 84282fd6f17235ca52613bbfd1cb6be301897836 (diff) | |
Rollup merge of #73953 - JohnTitor:audit-hidden-sugg, r=estebank
Audit hidden/short code suggestions Should fix #73641. Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes. r? @estebank
Diffstat (limited to 'src/test/ui/error-codes/E0642.fixed')
| -rw-r--r-- | src/test/ui/error-codes/E0642.fixed | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0642.fixed b/src/test/ui/error-codes/E0642.fixed new file mode 100644 index 00000000000..fc6255e0274 --- /dev/null +++ b/src/test/ui/error-codes/E0642.fixed @@ -0,0 +1,20 @@ +// run-rustfix + +#![allow(unused)] // for rustfix + +#[derive(Clone, Copy)] +struct S; + +trait T { + fn foo(_: (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies + + fn bar(_: (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies + + fn method(_: S) {} //~ ERROR patterns aren't allowed in methods without bodies + + fn f(&ident: &S) {} // ok + fn g(&&ident: &&S) {} // ok + fn h(mut ident: S) {} // ok +} + +fn main() {} |
