Skip to content

Commit b8df581

Browse files
authored
Rollup merge of rust-lang#93114 - lcnr:mk_array, r=RalfJung
update comment for `ensure_monomorphic_enough` r? `@RalfJung`
2 parents 5e46f7d + c29b637 commit b8df581

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compiler/rustc_const_eval/src/interpret/util.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitor};
33
use std::convert::TryInto;
44
use std::ops::ControlFlow;
55

6-
/// Returns `true` if a used generic parameter requires substitution.
6+
/// Checks whether a type contains generic parameters which require substitution.
7+
///
8+
/// In case it does, returns a `TooGeneric` const eval error. Note that due to polymorphization
9+
/// types may be "concrete enough" even though they still contain generic parameters in
10+
/// case these parameters are unused.
711
crate fn ensure_monomorphic_enough<'tcx, T>(tcx: TyCtxt<'tcx>, ty: T) -> InterpResult<'tcx>
812
where
913
T: TypeFoldable<'tcx>,

compiler/rustc_typeck/src/check/writeback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4343
let item_def_id = self.tcx.hir().local_def_id(item_id);
4444

4545
// This attribute causes us to dump some writeback information
46-
// in the form of errors, which is uSymbol for unit tests.
46+
// in the form of errors, which is used for unit tests.
4747
let rustc_dump_user_substs =
4848
self.tcx.has_attr(item_def_id.to_def_id(), sym::rustc_dump_user_substs);
4949

0 commit comments

Comments
 (0)