about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-09-05 11:26:51 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-09-11 11:31:38 +1000
commitfe08ac6da4643fa30e0da5e78f1d040d2aff4f01 (patch)
tree12d41e89c7ac2189d7b1751d798c9626488e7b03 /src
parent482d63673cbb2cec971f85653ff5babbf9bce0ce (diff)
downloadrust-fe08ac6da4643fa30e0da5e78f1d040d2aff4f01.tar.gz
rust-fe08ac6da4643fa30e0da5e78f1d040d2aff4f01.zip
Use `ast::Name` in `report_ambiguous_associated_type()`.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/astconv.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 9e52eae88ef..af0818053a4 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1461,7 +1461,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
         span: Span,
         type_str: &str,
         trait_str: &str,
-        name: &str,
+        name: ast::Name,
     ) {
         let mut err = struct_span_err!(self.tcx().sess, span, E0223, "ambiguous associated type");
         if let (Some(_), Ok(snippet)) = (
@@ -1688,7 +1688,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                         span,
                         &qself_ty.to_string(),
                         "Trait",
-                        &assoc_ident.as_str(),
+                        assoc_ident.name,
                     );
                 }
                 return Err(ErrorReported);
@@ -1761,7 +1761,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
                 span,
                 "Type",
                 &path_str,
-                &item_segment.ident.as_str(),
+                item_segment.ident.name,
             );
             return tcx.types.err;
         };