about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/hir/lowering.rs4
-rw-r--r--src/librustc/traits/project.rs2
-rw-r--r--src/librustc/util/common.rs3
-rw-r--r--src/libsyntax_pos/symbol.rs1
4 files changed, 6 insertions, 4 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index 3a8b139236c..08372207d9a 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -2218,7 +2218,7 @@ impl<'a> LoweringContext<'a> {
                         bindings: hir_vec![
                             hir::TypeBinding {
                                 hir_id: this.next_id(),
-                                ident: Ident::from_str(FN_OUTPUT_NAME),
+                                ident: Ident::with_empty_ctxt(FN_OUTPUT_NAME),
                                 ty: output
                                     .as_ref()
                                     .map(|ty| this.lower_ty(&ty, ImplTraitContext::disallowed()))
@@ -2543,7 +2543,7 @@ impl<'a> LoweringContext<'a> {
         let future_params = P(hir::GenericArgs {
             args: hir_vec![],
             bindings: hir_vec![hir::TypeBinding {
-                ident: Ident::from_str(FN_OUTPUT_NAME),
+                ident: Ident::with_empty_ctxt(FN_OUTPUT_NAME),
                 ty: output_ty,
                 hir_id: self.next_id(),
                 span,
diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs
index f05a1937291..67e76f7625c 100644
--- a/src/librustc/traits/project.rs
+++ b/src/librustc/traits/project.rs
@@ -1421,7 +1421,7 @@ fn confirm_callable_candidate<'cx, 'gcx, 'tcx>(
                 projection_ty: ty::ProjectionTy::from_ref_and_name(
                     tcx,
                     trait_ref,
-                    Ident::from_str(FN_OUTPUT_NAME),
+                    Ident::with_empty_ctxt(FN_OUTPUT_NAME),
                 ),
                 ty: ret_type
             }
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs
index 26194176350..67eaa19c080 100644
--- a/src/librustc/util/common.rs
+++ b/src/librustc/util/common.rs
@@ -11,6 +11,7 @@ use std::time::{Duration, Instant};
 
 use std::sync::mpsc::{Sender};
 use syntax_pos::{SpanData};
+use syntax::symbol::{Symbol, sym};
 use rustc_macros::HashStable;
 use crate::ty::TyCtxt;
 use crate::dep_graph::{DepNode};
@@ -18,7 +19,7 @@ use lazy_static;
 use crate::session::Session;
 
 // The name of the associated type for `Fn` return types
-pub const FN_OUTPUT_NAME: &str = "Output";
+pub const FN_OUTPUT_NAME: Symbol = sym::Output;
 
 // Useful type to use with `Result<>` indicate that an error has already
 // been reported to the user, so no need to continue checking.
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs
index c2a18c9df83..551ace3bdaf 100644
--- a/src/libsyntax_pos/symbol.rs
+++ b/src/libsyntax_pos/symbol.rs
@@ -385,6 +385,7 @@ symbols! {
         option,
         Option,
         opt_out_copy,
+        Output,
         overlapping_marker_traits,
         packed,
         panic_handler,