mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Rollup merge of #80599 - lqd:issue_805889, r=varkor
`const_generics_defaults`: don't ICE in the unimplemented parts The thought was that we could use `todo!`s to ensure we wouldn't forget to implement parts of the experimental gate. However, that can also lead to a suboptimal experience for users as shown in #80589 having both the error/warning about the experimental feature, and the ICE. Fixes #80589 r? `@varkor`
This commit is contained in:
@@ -2677,7 +2677,6 @@ pub fn print_type_bounds(&mut self, prefix: &'static str, bounds: &[ast::Generic
|
||||
s.print_type_bounds(":", ¶m.bounds);
|
||||
if let Some(ref _default) = default {
|
||||
// FIXME(const_generics_defaults): print the `default` value here
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2210,7 +2210,6 @@ pub fn print_generic_param(&mut self, param: &GenericParam<'_>) {
|
||||
self.print_type(ty);
|
||||
if let Some(ref _default) = default {
|
||||
// FIXME(const_generics_defaults): print the `default` value here
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,7 +619,6 @@ fn make(&self, offset: usize, _parent_id: Option<hir::HirId>, scx: &SaveContext<
|
||||
param_text.push_str(&ty_to_string(&ty));
|
||||
if let Some(ref _default) = default {
|
||||
// FIXME(const_generics_defaults): push the `default` value here
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
if !param.bounds.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user