From 3d6480bc3103f7238b1b0e020518e8aa72af3156 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 12 Jan 2021 20:19:13 +0100 Subject: Render Fn* trait objects and impl types as rust does --- crates/hir_ty/src/tests/display_source_code.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crates/hir_ty/src/tests/display_source_code.rs') diff --git a/crates/hir_ty/src/tests/display_source_code.rs b/crates/hir_ty/src/tests/display_source_code.rs index b502135d8..3d29021aa 100644 --- a/crates/hir_ty/src/tests/display_source_code.rs +++ b/crates/hir_ty/src/tests/display_source_code.rs @@ -39,3 +39,18 @@ fn main() { "#, ); } + +#[test] +fn render_raw_ptr_impl_ty() { + check_types_source_code( + r#" +trait Sized {} +trait Unpin {} +fn foo() -> *const (impl Unpin + Sized) { loop {} } +fn main() { + let foo = foo(); + foo; +} //^ *const (impl Unpin + Sized) +"#, + ); +} -- cgit v1.2.3