Skip to content

Commit

Permalink
Rollup merge of #80599 - lqd:issue_805889, r=varkor
Browse files Browse the repository at this point in the history
`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`
  • Loading branch information
m-ou-se authored Jan 2, 2021
2 parents bb70305 + ea0f639 commit 7a1b01e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_ast_pretty/src/pprust/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,6 @@ impl<'a> State<'a> {
s.print_type_bounds(":", &param.bounds);
if let Some(ref _default) = default {
// FIXME(const_generics_defaults): print the `default` value here
todo!();
}
}
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,6 @@ impl<'a> State<'a> {
self.print_type(ty);
if let Some(ref _default) = default {
// FIXME(const_generics_defaults): print the `default` value here
todo!();
}
}
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_save_analysis/src/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ impl<'hir> Sig for hir::Generics<'hir> {
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() {
Expand Down

0 comments on commit 7a1b01e

Please sign in to comment.