Skip to content

Commit be3724f

Browse files
committed
Change rustc::util::common::FN_OUTPUT_NAME to a Symbol.
1 parent c2e49bf commit be3724f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/librustc/hir/lowering.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ impl<'a> LoweringContext<'a> {
22182218
bindings: hir_vec![
22192219
hir::TypeBinding {
22202220
hir_id: this.next_id(),
2221-
ident: Ident::from_str(FN_OUTPUT_NAME),
2221+
ident: Ident::with_empty_ctxt(FN_OUTPUT_NAME),
22222222
ty: output
22232223
.as_ref()
22242224
.map(|ty| this.lower_ty(&ty, ImplTraitContext::disallowed()))
@@ -2543,7 +2543,7 @@ impl<'a> LoweringContext<'a> {
25432543
let future_params = P(hir::GenericArgs {
25442544
args: hir_vec![],
25452545
bindings: hir_vec![hir::TypeBinding {
2546-
ident: Ident::from_str(FN_OUTPUT_NAME),
2546+
ident: Ident::with_empty_ctxt(FN_OUTPUT_NAME),
25472547
ty: output_ty,
25482548
hir_id: self.next_id(),
25492549
span,

src/librustc/traits/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ fn confirm_callable_candidate<'cx, 'gcx, 'tcx>(
14211421
projection_ty: ty::ProjectionTy::from_ref_and_name(
14221422
tcx,
14231423
trait_ref,
1424-
Ident::from_str(FN_OUTPUT_NAME),
1424+
Ident::with_empty_ctxt(FN_OUTPUT_NAME),
14251425
),
14261426
ty: ret_type
14271427
}

src/librustc/util/common.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ use std::time::{Duration, Instant};
1111

1212
use std::sync::mpsc::{Sender};
1313
use syntax_pos::{SpanData};
14+
use syntax::symbol::{Symbol, sym};
1415
use rustc_macros::HashStable;
1516
use crate::ty::TyCtxt;
1617
use crate::dep_graph::{DepNode};
1718
use lazy_static;
1819
use crate::session::Session;
1920

2021
// The name of the associated type for `Fn` return types
21-
pub const FN_OUTPUT_NAME: &str = "Output";
22+
pub const FN_OUTPUT_NAME: Symbol = sym::Output;
2223

2324
// Useful type to use with `Result<>` indicate that an error has already
2425
// been reported to the user, so no need to continue checking.

src/libsyntax_pos/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ symbols! {
385385
option,
386386
Option,
387387
opt_out_copy,
388+
Output,
388389
overlapping_marker_traits,
389390
packed,
390391
panic_handler,

0 commit comments

Comments
 (0)