Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/item_tree/tests.rs')
-rw-r--r--crates/hir-def/src/item_tree/tests.rs35
1 files changed, 6 insertions, 29 deletions
diff --git a/crates/hir-def/src/item_tree/tests.rs b/crates/hir-def/src/item_tree/tests.rs
index 79bab11998..c6930401a6 100644
--- a/crates/hir-def/src/item_tree/tests.rs
+++ b/crates/hir-def/src/item_tree/tests.rs
@@ -129,40 +129,34 @@ enum E {
#[derive(Debug)]
// AstId: 2
pub(self) struct Struct {
- // AstId: 6
#[doc = " fld docs"]
pub(self) fld: (),
}
// AstId: 3
pub(self) struct Tuple(
- // AstId: 7
#[attr]
pub(self) 0: u8,
);
// AstId: 4
pub(self) union Ize {
- // AstId: 8
pub(self) a: (),
- // AstId: 9
pub(self) b: (),
}
// AstId: 5
pub(self) enum E {
- // AstId: 10
+ // AstId: 6
#[doc = " comment on Unit"]
Unit,
- // AstId: 11
+ // AstId: 7
#[doc = " comment on Tuple"]
Tuple(
- // AstId: 13
pub(self) 0: u8,
),
- // AstId: 12
+ // AstId: 8
Struct {
- // AstId: 14
#[doc = " comment on a: u8"]
pub(self) a: u8,
},
@@ -201,9 +195,7 @@ trait Tr: SuperTrait + 'lifetime {
// AstId: 3
pub(self) fn f(
#[attr]
- // AstId: 5
u8,
- // AstId: 6
(),
) -> () { ... }
@@ -213,12 +205,11 @@ trait Tr: SuperTrait + 'lifetime {
Self: SuperTrait,
Self: 'lifetime
{
- // AstId: 8
+ // AstId: 6
pub(self) type Assoc: AssocBound = Default;
- // AstId: 9
+ // AstId: 7
pub(self) fn method(
- // AstId: 10
self: &Self,
) -> ();
}
@@ -300,17 +291,11 @@ struct S {
expect![[r#"
// AstId: 1
pub(self) struct S {
- // AstId: 2
pub(self) a: self::Ty,
- // AstId: 3
pub(self) b: super::SuperTy,
- // AstId: 4
pub(self) c: super::super::SuperSuperTy,
- // AstId: 5
pub(self) d: ::abs::Path,
- // AstId: 6
pub(self) e: crate::Crate,
- // AstId: 7
pub(self) f: plain::path::Ty,
}
"#]],
@@ -331,13 +316,9 @@ struct S {
expect![[r#"
// AstId: 1
pub(self) struct S {
- // AstId: 2
pub(self) a: Mixed::<'a, T, Item = (), OtherItem = u8>,
- // AstId: 3
pub(self) b: Qualified::<Self=Fully>::Syntax,
- // AstId: 4
pub(self) c: <TypeAnchored>::Path::<'a>,
- // AstId: 5
pub(self) d: dyn for<'a> Trait::<'a>,
}
"#]],
@@ -371,15 +352,12 @@ trait Tr<'a, T: 'a>: Super where Self: for<'a> Tr<'a, T> {}
T: 'a,
T: 'b
{
- // AstId: 8
pub(self) field: &'a &'b T,
}
// AstId: 2
pub(self) struct Tuple<T, U>(
- // AstId: 9
pub(self) 0: T,
- // AstId: 10
pub(self) 1: U,
)
where
@@ -393,9 +371,8 @@ trait Tr<'a, T: 'a>: Super where Self: for<'a> Tr<'a, T> {}
T: 'a,
T: 'b
{
- // AstId: 12
+ // AstId: 9
pub(self) fn f<G>(
- // AstId: 13
impl Copy,
) -> impl Copy
where