diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-06-05 23:32:39 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-06-05 23:32:39 +0200 |
| commit | 85a68dbdcd0200a711bacda9c7170129350813c8 (patch) | |
| tree | 0062542dbbd217a717f51f691abe2f82c4c84eae /lib/xixanta/src/mapping.rs | |
| parent | db18a7445780956223d5509402023a25cf0b2121 (diff) | |
| download | tools.nes-85a68dbdcd0200a711bacda9c7170129350813c8.tar.gz tools.nes-85a68dbdcd0200a711bacda9c7170129350813c8.zip | |
Refer to the original file for unused objects
When warning users on unused objects (e.g. variables, proc's), we have
to pick up the source of origin for this warning. In places where the
original PNode is not available, then we go with the last source we have
at hand, as that's the usual way to go (i.e. the error occurred at the
current source/context).
That being said, for unused objects that's not desirable, because we
might otherwise claim the error to happen on the file we first
targetted, but it's way more useful to understand where the object was
defined.
Hence, when defining a variable, address or proc, let's actually store
the PNode associated with it as well. This way the checker can hopefully
get the source from this PNode and be more clear to the user.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/mapping.rs')
0 files changed, 0 insertions, 0 deletions
