Skip to content

Commit 1fc3c4c

Browse files
committed
adjust const generics defaults FIXMEs to the new feature gate
1 parent 907ba75 commit 1fc3c4c

File tree

13 files changed

+14
-14
lines changed

13 files changed

+14
-14
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ fn validate_generic_param_order(
774774
}
775775
GenericParamKind::Type { default: None } => (),
776776
GenericParamKind::Lifetime => (),
777-
// FIXME(const_generics:defaults)
777+
// FIXME(const_generics_defaults)
778778
GenericParamKind::Const { ty: _, kw_span: _, default: _ } => (),
779779
}
780780
first = false;

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
958958
ty::GenericParamDefKind::Type { has_default, .. } => {
959959
Some((param.def_id, has_default))
960960
}
961-
ty::GenericParamDefKind::Const => None, // FIXME(const_generics:defaults)
961+
ty::GenericParamDefKind::Const => None, // FIXME(const_generics_defaults)
962962
})
963963
.peekable();
964964
let has_default = {

compiler/rustc_metadata/src/rmeta/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ impl EncodeContext<'a, 'tcx> {
18341834
EntryKind::ConstParam,
18351835
true,
18361836
);
1837-
// FIXME(const_generics:defaults)
1837+
// FIXME(const_generics_defaults)
18381838
}
18391839
}
18401840
}

compiler/rustc_middle/src/ty/print/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub trait Printer<'tcx>: Sized {
203203
self.tcx().type_of(param.def_id).subst(self.tcx(), substs),
204204
)
205205
}
206-
ty::GenericParamDefKind::Const => false, // FIXME(const_generics:defaults)
206+
ty::GenericParamDefKind::Const => false, // FIXME(const_generics_defaults)
207207
}
208208
})
209209
.count();

compiler/rustc_passes/src/stability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
443443

444444
fn visit_generic_param(&mut self, p: &'tcx hir::GenericParam<'tcx>) {
445445
let kind = match &p.kind {
446-
// FIXME(const_generics:defaults)
446+
// FIXME(const_generics_defaults)
447447
hir::GenericParamKind::Type { default, .. } if default.is_some() => {
448448
AnnotationKind::Container
449449
}

compiler/rustc_resolve/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ enum ResolutionError<'a> {
214214
/// Error E0530: `X` bindings cannot shadow `Y`s.
215215
BindingShadowsSomethingUnacceptable(&'static str, Symbol, &'a NameBinding<'a>),
216216
/// Error E0128: type parameters with a default cannot use forward-declared identifiers.
217-
ForwardDeclaredTyParam, // FIXME(const_generics:defaults)
217+
ForwardDeclaredTyParam, // FIXME(const_generics_defaults)
218218
/// ERROR E0770: the type of const parameters must not depend on other generic parameters.
219219
ParamInTyOfConstParam(Symbol),
220220
/// constant values inside of type parameter defaults must not depend on generic parameters.

compiler/rustc_typeck/src/astconv/generics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
387387
defaults.types += has_default as usize
388388
}
389389
GenericParamDefKind::Const => {
390-
// FIXME(const_generics:defaults)
390+
// FIXME(const_generics_defaults)
391391
}
392392
};
393393
}

compiler/rustc_typeck/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
486486
}
487487
GenericParamDefKind::Const => {
488488
let ty = tcx.at(self.span).type_of(param.def_id);
489-
// FIXME(const_generics:defaults)
489+
// FIXME(const_generics_defaults)
490490
if infer_args {
491491
// No const parameters were provided, we can infer all.
492492
self.astconv.ct_infer(ty, Some(param), self.span).into()

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13761376
}
13771377
}
13781378
GenericParamDefKind::Const => {
1379-
// FIXME(const_generics:defaults)
1379+
// FIXME(const_generics_defaults)
13801380
// No const parameters were provided, we have to infer them.
13811381
self.fcx.var_for_def(self.span, param)
13821382
}

compiler/rustc_typeck/src/check/wfcheck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ fn check_where_clauses<'tcx, 'fcx>(
785785
}
786786

787787
GenericParamDefKind::Const => {
788-
// FIXME(const_generics:defaults)
788+
// FIXME(const_generics_defaults)
789789
fcx.tcx.mk_param_from_def(param)
790790
}
791791
}

compiler/rustc_typeck/src/collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl Visitor<'tcx> for CollectItemTypesVisitor<'tcx> {
228228
hir::GenericParamKind::Const { .. } => {
229229
let def_id = self.tcx.hir().local_def_id(param.hir_id);
230230
self.tcx.ensure().type_of(def_id);
231-
// FIXME(const_generics:defaults)
231+
// FIXME(const_generics_defaults)
232232
}
233233
}
234234
}

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ impl Clean<GenericParamDef> for hir::GenericParam<'_> {
612612
GenericParamDefKind::Const {
613613
did: cx.tcx.hir().local_def_id(self.hir_id).to_def_id(),
614614
ty: ty.clean(cx),
615-
// FIXME(const_generics_defaults): add `default` field here to the docs
615+
// FIXME(const_generics_defaults): add `default` field here for docs
616616
},
617617
),
618618
};
@@ -1386,7 +1386,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &DocContext<'_>) -> Type {
13861386
if let Some(ct) = const_ {
13871387
ct_substs.insert(const_param_def_id.to_def_id(), ct.clean(cx));
13881388
}
1389-
// FIXME(const_generics:defaults)
1389+
// FIXME(const_generics_defaults)
13901390
indices.consts += 1;
13911391
}
13921392
}

src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
77
//[full]~^ ERROR constant values inside of type parameter defaults
88
//[min]~^^ ERROR generic parameters may not be used in const operations
99

10-
// FIXME(const_generics:defaults): We still don't know how to we deal with type defaults.
10+
// FIXME(const_generics_defaults): We still don't know how to deal with type defaults.
1111
struct Bar<T = [u8; N], const N: usize>(T);
1212
//~^ ERROR constant values inside of type parameter defaults
1313
//~| ERROR type parameters with a default

0 commit comments

Comments
 (0)