diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-12-10 21:33:10 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-10 21:33:10 -0800 |
| commit | dc90573454775538702f27dedd458f7c7eb31124 (patch) | |
| tree | 381b4a228867b29f76db1f76aa23b34d1cc23d97 /compiler/rustc_codegen_llvm/src | |
| parent | 17ec4b8258b3f59ded7b2cfae8484be976c658af (diff) | |
| parent | 4e21942ba4d435c3211677ad42ddc528fff97857 (diff) | |
| download | rust-dc90573454775538702f27dedd458f7c7eb31124.tar.gz rust-dc90573454775538702f27dedd458f7c7eb31124.zip | |
Rollup merge of #79851 - camelid:better-error-for-default-fn, r=davidtwco
Clarify the 'default is only allowed on...' error
Code like
impl Foo {
default fn foo() {}
}
will trigger the error
error: `default` is only allowed on items in `impl` definitions
--> src/lib.rs:5:5
|
5 | default fn foo() {}
| -------^^^^^^^^^
| |
| `default` because of this
but that's very confusing! I *did* put it on an item in an impl!
So this commit changes the message to
error: `default` is only allowed on items in trait impls
--> src/lib.rs:5:5
|
5 | default fn foo() {}
| -------^^^^^^^^^
| |
| `default` because of this
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
