about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/macros.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-29 00:03:53 +0000
committerbors <bors@rust-lang.org>2024-01-29 00:03:53 +0000
commit8a0b5ae1996721b38ca84af0b81a36e83d0d0c2c (patch)
tree6c1aab3f98a58ae9fd171fbd80732e4acbef7527 /compiler/rustc_resolve/src/macros.rs
parent635124704849eeead4e3a7bb6e663c5351571d93 (diff)
parent5d9dfbd08f38c2a9bc71d39de8f5c7776afe0f9e (diff)
downloadrust-8a0b5ae1996721b38ca84af0b81a36e83d0d0c2c.tar.gz
rust-8a0b5ae1996721b38ca84af0b81a36e83d0d0c2c.zip
Auto merge of #119972 - nnethercote:add-ErrCode, r=oli-obk
Add `ErrCode`

Error codes are integers, but `String` is used everywhere to represent them. Gross!

This commit introduces `ErrCode`, an integral newtype for error codes, replacing `String`. The commit also introduces constants like `E0123` for all the used error codes.

r? `@estebank`
Diffstat (limited to 'compiler/rustc_resolve/src/macros.rs')
-rw-r--r--compiler/rustc_resolve/src/macros.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs
index 1c085ddf57b..a6bf289a76a 100644
--- a/compiler/rustc_resolve/src/macros.rs
+++ b/compiler/rustc_resolve/src/macros.rs
@@ -15,7 +15,7 @@ use rustc_ast_pretty::pprust;
 use rustc_attr::StabilityLevel;
 use rustc_data_structures::intern::Interned;
 use rustc_data_structures::sync::Lrc;
-use rustc_errors::{struct_span_code_err, Applicability};
+use rustc_errors::{codes::*, struct_span_code_err, Applicability};
 use rustc_expand::base::{Annotatable, DeriveResolutions, Indeterminate, ResolverExpand};
 use rustc_expand::base::{SyntaxExtension, SyntaxExtensionKind};
 use rustc_expand::compile_declarative_macro;