Skip to content

Commit 5242b36

Browse files
committed
[TMP] Add some FIXMEs
1 parent 12968ea commit 5242b36

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,8 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
10231023
.collect::<Vec<_>>();
10241024

10251025
if !suggestions.is_empty() {
1026+
// FIXME: This suggests binding to an assoc ty even if the term is a const.
1027+
// FIXME: Generalize this to cover assoc consts, too.
10261028
err.multipart_suggestion_verbose(
10271029
format!(
10281030
"replace the generic bound{s} with the associated type{s}",

compiler/rustc_hir_analysis/src/hir_ty_lowering/dyn_trait.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,13 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
149149
let mut projection_bounds = FxIndexMap::default();
150150
for (proj, proj_span) in elaborated_projection_bounds {
151151
let proj = proj.map_bound(|mut b| {
152+
// FIXME(fmease): Surely we need to do that for const bindings, too.
152153
if let Some(term_ty) = &b.term.as_type() {
153154
let references_self = term_ty.walk().any(|arg| arg == dummy_self.into());
154155
if references_self {
156+
// FIXME(fmease): The term "type alias" isn't relevant at all, those are
157+
// expanded eagerly during HIR ty lowering.
158+
// Rename diagnostic struct & prolly rephrase diag msg.
155159
// With trait alias and type alias combined, type resolver
156160
// may not be able to catch all illegal `Self` usages (issue 139082)
157161
let guar = self.dcx().emit_err(SelfInTypeAlias { span });

0 commit comments

Comments
 (0)