]> git.lizzy.rs Git - rust.git/commitdiff
const_generics_defaults: don't use todo
authorRémy Rakic <remy.rakic+github@gmail.com>
Fri, 1 Jan 2021 21:35:56 +0000 (22:35 +0100)
committerRémy Rakic <remy.rakic+github@gmail.com>
Fri, 1 Jan 2021 21:35:56 +0000 (22:35 +0100)
So that at least it won't ICE for users whether or not they enable the gate. For developers the FIXMEs are enough.

compiler/rustc_ast_pretty/src/pprust/state.rs
compiler/rustc_hir_pretty/src/lib.rs
compiler/rustc_save_analysis/src/sig.rs

index bdd378b34e144829e81d1bfb7ce9e6e5f5bc018e..0e4f2798bd313e97c6d71bac84bd8f47447dc10b 100644 (file)
@@ -2677,7 +2677,6 @@ pub fn print_type_bounds(&mut self, prefix: &'static str, bounds: &[ast::Generic
                     s.print_type_bounds(":", &param.bounds);
                     if let Some(ref _default) = default {
                         // FIXME(const_generics_defaults): print the `default` value here
-                        todo!();
                     }
                 }
             }
index 85bc38daa3d2804800b55fa8b87055b035a854f9..eb6c65fcd8c8114b0d2742c076dbed9d820f8f59 100644 (file)
@@ -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!();
                 }
             }
         }
index e7d1c9d3bbe581f276f375a3ad539d8b69d1c1d1..ab3da270fe66faf6cd6481adf88a072551ea29a6 100644 (file)
@@ -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() {