about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-01-02 11:29:14 +0000
committerGitHub <noreply@github.com>2021-01-02 11:29:14 +0000
commit7a1b01ec025c686efae215321bc7f4544c2ed7ea (patch)
tree8d5864998ebe05a41f22c7043de0bbdc2bcf4e6a
parentbb703058b71244d547a7b866258249f9e7e1b93b (diff)
parentea0f6396aa25cadb84bfa37b098b1fb6916bc38f (diff)
downloadrust-7a1b01ec025c686efae215321bc7f4544c2ed7ea.tar.gz
rust-7a1b01ec025c686efae215321bc7f4544c2ed7ea.zip
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`
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs1
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs1
-rw-r--r--compiler/rustc_save_analysis/src/sig.rs1
3 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index bdd378b34e1..0e4f2798bd3 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -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!();
                     }
                 }
             }
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs
index 85bc38daa3d..eb6c65fcd8c 100644
--- a/compiler/rustc_hir_pretty/src/lib.rs
+++ b/compiler/rustc_hir_pretty/src/lib.rs
@@ -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!();
                 }
             }
         }
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs
index e7d1c9d3bbe..ab3da270fe6 100644
--- a/compiler/rustc_save_analysis/src/sig.rs
+++ b/compiler/rustc_save_analysis/src/sig.rs
@@ -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() {