mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Render Fn* trait objects and impl types as rust does
This commit is contained in:
parent
e9e3ab549d
commit
3d6480bc31
6 changed files with 134 additions and 31 deletions
|
@ -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)
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue