-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Improvements of librustc_resolve and add missing error codes #26898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
c3fd0e1
2e00b31
8b731a5
f1b231d
48ee57e
cbf0b1b
f52a87c
c5f7c19
31262c2
60133aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,12 +202,52 @@ http://doc.rust-lang.org/reference.html#types | |
} | ||
|
||
register_diagnostics! { | ||
E0157, | ||
E0153, | ||
E0153, // called no where | ||
E0157, // called from no where | ||
E0253, // not directly importable | ||
E0254, // import conflicts with imported crate in this module | ||
E0257, | ||
E0258, | ||
E0364, // item is private | ||
E0365 // item is private | ||
E0365, // item is private | ||
E0401, // can't use type parameters from outer function | ||
E0402, // cannot use an outer type parameter in this context | ||
E0403, // the name `{}` is already used | ||
E0404, // is not a trait | ||
E0405, // use of undeclared trait name | ||
E0406, // undeclared associated type | ||
E0407, // method is not a member of trait | ||
E0408, // variable from pattern #1 is not bound in pattern # | ||
E0409, // variable is bound with different mode in pattern # than in | ||
// pattern #1 | ||
E0410, // variable from pattern is not bound in pattern 1 | ||
E0411, // use of `Self` outside of an impl or trait | ||
E0412, // use of undeclared | ||
E0413, // declaration of shadows an enum variant or unit-like struct in | ||
// scope | ||
E0414, // only irrefutable patterns allowed here | ||
E0415, // identifier is bound more than once in this parameter list | ||
E0416, // identifier is bound more than once in the same pattern | ||
E0417, // static variables cannot be referenced in a pattern, use a | ||
// `const` instead | ||
E0418, // is not an enum variant, struct or const | ||
E0419, // unresolved enum variant, struct or const | ||
E0420, // is not an associated const | ||
E0421, // unresolved associated const | ||
E0422, // does not name a structure | ||
E0423, // is a struct variant name, but this expression uses it like a | ||
// function name | ||
E0424, // `self` is not available in a static method. | ||
E0425, // unresolved name | ||
E0426, // use of undeclared label | ||
E0427, // cannot use `ref` binding mode with ... | ||
E0428, // duplicate definition of ... | ||
E0429, // `self` imports are only allowed within a { } list | ||
E0430, // `self` import can only appear once in the list | ||
E0431, // `self` import can only appear in an import list with a non-empty | ||
// prefix | ||
E0432, // unresolved import | ||
E0433, // failed to resolve | ||
E0434, // can't capture dynamic environment in a fn item | ||
E0435 // attempt to use a non-constant value in a constant | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: why not have a trailing comma? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a macro. In this case, if I add one, an error is reported. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The macro should be improved to allow the trailing comma. It's a separate issue though.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bluss: I'll take a look to it if you want, but in another PR. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to pass this by reference AFAICT. Can also import
resolve_error
andResolutionError
to get rid of the absolute paths' leading::
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, I update.