about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorZack M. Davis <code@zackmdavis.net>2018-10-21 15:37:01 -0700
committerZack M. Davis <code@zackmdavis.net>2018-10-21 15:50:45 -0700
commitb0d3d3b959e34ecb6c0b7c29f22c77d8c301514d (patch)
tree440ed905505ba938c604cb58154e87897fcc49ed /src/rustllvm/RustWrapper.cpp
parent22cc2ae8057d14e980b7c784e1eb2eee26b59e7d (diff)
downloadrust-b0d3d3b959e34ecb6c0b7c29f22c77d8c301514d.tar.gz
rust-b0d3d3b959e34ecb6c0b7c29f22c77d8c301514d.zip
only issue "variant of the expected type" suggestion for enums
Felix S. Klock II pointed out that this suggestion (introduced in
pull-request #43178 / eac74104) was being issued for one-field-struct
expected types (in which case it is misleading and outright wrong),
even though it was only intended for one-field enum-variants (most
notably, `Some`). Particularly tender-hearted code-historians may be
inclined to show mercy towards the author of #43178 on the grounds
that it's somewhat confusing that struct field definitions are given
in a type called `ty::VariantDef`.

Add a conditional to adhere to the original intent. (It would be
possible to generalize to structs, but not obviously net desirable.)
This adds a level of indentation, so the diff here is going to be
easier to read in ignore-whitespace mode (`-w`).

Resolves #55250.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions