1
Fork 0

Various diagnostics clean ups/tweaks

* Always point at macros, including derive macros
* Point at non-local items that introduce a trait requirement
* On private associated item, point at definition
This commit is contained in:
Esteban Küber 2021-07-17 11:13:50 -07:00
parent c78ebb7bdc
commit ba052bd8de
163 changed files with 1474 additions and 398 deletions

View file

@ -952,7 +952,7 @@ pub enum AstPass {
}
impl AstPass {
fn descr(self) -> &'static str {
pub fn descr(self) -> &'static str {
match self {
AstPass::StdImports => "standard library imports",
AstPass::TestHarness => "test harness",
@ -989,7 +989,7 @@ pub enum ForLoopLoc {
impl DesugaringKind {
/// The description wording should combine well with "desugaring of {}".
fn descr(self) -> &'static str {
pub fn descr(self) -> &'static str {
match self {
DesugaringKind::CondTemporary => "`if` or `while` condition",
DesugaringKind::Async => "`async` block or function",