Fix tests.

This commit is contained in:
Dawer 2021-06-16 03:23:04 +05:00
parent 5f2486e9a8
commit 0f6621fbfa
6 changed files with 355 additions and 336 deletions

View file

@ -1189,7 +1189,9 @@ fn main() {
#[test]
fn hover_for_param_with_multiple_traits() {
check(
r#"trait Deref {
r#"
//- minicore: sized
trait Deref {
type Target: ?Sized;
}
trait DerefMut {
@ -3380,17 +3382,17 @@ fn foo() {
fn hover_type_param() {
check(
r#"
//- minicore: sized
struct Foo<T>(T);
trait Copy {}
trait Clone {}
trait Sized {}
impl<T: Copy + Clone> Foo<T$0> where T: Sized {}
"#,
expect![[r#"
*T*
```rust
T: Copy + Clone + Sized
T: Copy + Clone
```
"#]],
);
@ -3423,6 +3425,26 @@ impl<T: 'static> Foo<T$0> {}
);
}
#[test]
fn hover_type_param_not_sized() {
check(
r#"
//- minicore: sized
struct Foo<T>(T);
trait Copy {}
trait Clone {}
impl<T: Copy + Clone> Foo<T$0> where T: ?Sized {}
"#,
expect![[r#"
*T*
```rust
T: Copy + Clone + ?Sized
```
"#]],
);
}
#[test]
fn hover_const_param() {
check(