diff --git a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs index df848a26d390..4aeb7c009952 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs @@ -876,6 +876,7 @@ impl<'a> State<'a> { } } } else { + self.end(); // Close the ibox for the pattern. self.word(","); } self.end(); // Close enclosing cbox. diff --git a/tests/pretty/never-pattern.pp b/tests/pretty/never-pattern.pp index fe40008b971d..923ad9b82c7a 100644 --- a/tests/pretty/never-pattern.pp +++ b/tests/pretty/never-pattern.pp @@ -12,7 +12,6 @@ use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; -fn f(x: Result) { - _ = match x { Ok(x) => x, Err(!) , }; } +fn f(x: Result) { _ = match x { Ok(x) => x, Err(!) , }; } - fn main() {} +fn main() {}