diff options
| author | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-06-23 22:18:43 +0530 |
|---|---|---|
| committer | Ramkumar Ramachandra <artagnon@gmail.com> | 2013-06-25 23:58:48 +0530 |
| commit | 9f80591d84790a9571707a85cf4bc5d8f6df114d (patch) | |
| tree | a03261cb60137dcf127e54148616b7137a9e6ca6 /src/rt/rust_kernel.cpp | |
| parent | 3b126e4d6dda1eac3881b8ca19772071997a7992 (diff) | |
| download | rust-9f80591d84790a9571707a85cf4bc5d8f6df114d.tar.gz rust-9f80591d84790a9571707a85cf4bc5d8f6df114d.zip | |
resolve: report duplicate module definitions
add_child() is responsible for reporting errors about type, value, and
module duplicate definitions. Although it checks for all three, it uses
namespace_to_str() to convert a Namespace value into a string before
printing an error like:
error: duplicate definition of type `foo`
^^^^
note: first definition of type foo here:
^^^^
Unfortunately, this string can only be one of "type" or
"value" (corresponding to TypeNS and ValueNS respectively), and it
reports duplicate modules as duplicate types.
To alleviate the problem, define a special NamespaceError enum to define
more specialized errors, and use it instead of attempting to reuse the
Namespace enum.
Reported-by: Corey Richardson <corey@octayn.net>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions
