about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2021-07-17 11:13:50 -0700
committerEsteban Küber <esteban@kuber.com.ar>2021-07-19 08:43:35 -0700
commitba052bd8de1459acb6809215b0bedf4ea476ef9a (patch)
treef6ed28030012d73e09f041b7f94d78fced448771 /compiler/rustc_span/src
parentc78ebb7bdcfc924a20fd069891ffe1364d6814e7 (diff)
downloadrust-ba052bd8de1459acb6809215b0bedf4ea476ef9a.tar.gz
rust-ba052bd8de1459acb6809215b0bedf4ea476ef9a.zip
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
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/hygiene.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs
index d292f652896..9499e4b5e7a 100644
--- a/compiler/rustc_span/src/hygiene.rs
+++ b/compiler/rustc_span/src/hygiene.rs
@@ -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",