2021-07-15 09:27:01 -05:00
|
|
|
//! Completion tests for attributes.
|
|
|
|
use expect_test::{expect, Expect};
|
|
|
|
|
|
|
|
use crate::tests::{check_edit, completion_list};
|
|
|
|
|
|
|
|
fn check(ra_fixture: &str, expect: Expect) {
|
|
|
|
let actual = completion_list(ra_fixture);
|
|
|
|
expect.assert_eq(&actual);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2021-12-05 08:57:28 -06:00
|
|
|
fn proc_macros() {
|
2021-07-15 09:27:01 -05:00
|
|
|
check(
|
|
|
|
r#"
|
2021-12-05 08:57:28 -06:00
|
|
|
//- proc_macros: identity
|
2021-07-15 09:27:01 -05:00
|
|
|
#[$0]
|
2021-12-05 08:57:28 -06:00
|
|
|
struct Foo;
|
2021-07-15 09:27:01 -05:00
|
|
|
"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
2022-05-05 03:49:43 -05:00
|
|
|
at derive(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2021-12-05 08:57:28 -06:00
|
|
|
at non_exhaustive
|
2022-05-05 03:49:43 -05:00
|
|
|
at repr(…)
|
|
|
|
at warn(…)
|
|
|
|
md proc_macros
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-01-11 12:03:21 -06:00
|
|
|
#[test]
|
|
|
|
fn proc_macros_on_comment() {
|
|
|
|
check(
|
|
|
|
r#"
|
|
|
|
//- proc_macros: identity
|
|
|
|
/// $0
|
|
|
|
#[proc_macros::identity]
|
|
|
|
struct Foo;
|
|
|
|
"#,
|
|
|
|
expect![[r#""#]],
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-09-13 17:31:14 -05:00
|
|
|
#[test]
|
2021-12-05 08:57:28 -06:00
|
|
|
fn proc_macros_qualified() {
|
2021-09-13 17:31:14 -05:00
|
|
|
check(
|
|
|
|
r#"
|
2021-12-05 08:57:28 -06:00
|
|
|
//- proc_macros: identity
|
|
|
|
#[proc_macros::$0]
|
2021-09-13 17:31:14 -05:00
|
|
|
struct Foo;
|
|
|
|
"#,
|
2022-02-02 08:03:46 -06:00
|
|
|
expect![[r#"
|
2022-03-10 15:21:58 -06:00
|
|
|
at identity proc_macro identity
|
2022-02-02 08:03:46 -06:00
|
|
|
"#]],
|
2021-09-13 17:31:14 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-07-15 09:27:01 -05:00
|
|
|
#[test]
|
|
|
|
fn inside_nested_attr() {
|
|
|
|
check(r#"#[cfg($0)]"#, expect![[]])
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn with_existing_attr() {
|
|
|
|
check(
|
|
|
|
r#"#[no_mangle] #[$0] mcall!();"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at forbid(…)
|
|
|
|
at warn(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_source_file() {
|
|
|
|
check(
|
|
|
|
r#"#![$0]"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
at crate_name = ""
|
2021-07-15 09:27:01 -05:00
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
2021-07-15 09:27:01 -05:00
|
|
|
at feature(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
at forbid(…)
|
|
|
|
at must_use
|
2021-07-15 09:27:01 -05:00
|
|
|
at no_implicit_prelude
|
|
|
|
at no_main
|
2022-05-05 03:49:43 -05:00
|
|
|
at no_mangle
|
2021-07-15 09:27:01 -05:00
|
|
|
at no_std
|
2021-09-05 03:57:11 -05:00
|
|
|
at recursion_limit = "…"
|
2021-07-15 09:27:01 -05:00
|
|
|
at type_length_limit = …
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at windows_subsystem = "…"
|
2022-05-05 03:49:43 -05:00
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_module() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] mod foo;"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
|
|
|
at macro_use
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
|
|
|
at path = "…"
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
check(
|
|
|
|
r#"mod foo {#![$0]}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_implicit_prelude
|
2022-05-05 03:49:43 -05:00
|
|
|
at no_mangle
|
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_macro_rules() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] macro_rules! foo {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at macro_export
|
|
|
|
at macro_use
|
2022-05-05 03:49:43 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_macro_def() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] macro foo {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_extern_crate() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] extern crate foo;"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
|
|
|
at macro_use
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_use() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] use foo;"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_type_alias() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] type foo = ();"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_struct() {
|
|
|
|
check(
|
2021-12-17 08:22:53 -06:00
|
|
|
r#"
|
|
|
|
//- minicore:derive
|
|
|
|
#[$0]
|
|
|
|
struct Foo;
|
|
|
|
"#,
|
2021-07-15 09:27:01 -05:00
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
2022-05-05 03:49:43 -05:00
|
|
|
at derive macro derive
|
|
|
|
at derive(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
|
|
|
at non_exhaustive
|
2022-05-05 03:49:43 -05:00
|
|
|
at repr(…)
|
|
|
|
at warn(…)
|
|
|
|
md core
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_enum() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] enum Foo {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
2022-05-05 03:49:43 -05:00
|
|
|
at derive(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
|
|
|
at non_exhaustive
|
2022-05-05 03:49:43 -05:00
|
|
|
at repr(…)
|
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_const() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] const FOO: () = ();"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_static() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] static FOO: () = ()"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
2021-07-15 09:27:01 -05:00
|
|
|
at export_name = "…"
|
2022-05-05 03:49:43 -05:00
|
|
|
at forbid(…)
|
|
|
|
at global_allocator
|
2021-07-15 09:27:01 -05:00
|
|
|
at link_name = "…"
|
|
|
|
at link_section = "…"
|
2022-05-05 03:49:43 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2021-07-15 09:27:01 -05:00
|
|
|
at used
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_trait() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] trait Foo {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at must_use
|
2022-05-05 03:49:43 -05:00
|
|
|
at no_mangle
|
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_impl() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] impl () {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
at automatically_derived
|
2021-07-15 09:27:01 -05:00
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
check(
|
|
|
|
r#"impl () {#![$0]}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_extern_block() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] extern {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
|
|
|
at link
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
check(
|
|
|
|
r#"extern {#![$0]}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
|
|
|
at forbid(…)
|
|
|
|
at link
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_variant() {
|
|
|
|
check(
|
|
|
|
r#"enum Foo { #[$0] Bar }"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at deny(…)
|
|
|
|
at forbid(…)
|
|
|
|
at non_exhaustive
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_on_fn() {
|
|
|
|
check(
|
|
|
|
r#"#[$0] fn main() {}"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
at cold
|
2021-07-15 09:27:01 -05:00
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
2022-05-05 03:49:43 -05:00
|
|
|
at doc(hidden)
|
2021-07-15 09:27:01 -05:00
|
|
|
at export_name = "…"
|
2022-05-05 03:49:43 -05:00
|
|
|
at forbid(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at ignore = "…"
|
|
|
|
at inline
|
2022-05-05 03:49:43 -05:00
|
|
|
at link_name = "…"
|
|
|
|
at link_section = "…"
|
2021-07-15 09:27:01 -05:00
|
|
|
at must_use
|
2022-05-05 03:49:43 -05:00
|
|
|
at must_use
|
|
|
|
at no_mangle
|
2021-07-15 09:27:01 -05:00
|
|
|
at panic_handler
|
|
|
|
at proc_macro
|
|
|
|
at proc_macro_attribute
|
2022-05-05 03:49:43 -05:00
|
|
|
at proc_macro_derive(…)
|
2021-07-15 09:27:01 -05:00
|
|
|
at should_panic
|
|
|
|
at target_feature = "…"
|
|
|
|
at test
|
|
|
|
at track_caller
|
2022-05-05 03:49:43 -05:00
|
|
|
at warn(…)
|
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn attr_in_source_file_end() {
|
|
|
|
check(
|
|
|
|
r#"#[$0]"#,
|
|
|
|
expect![[r#"
|
|
|
|
at allow(…)
|
|
|
|
at automatically_derived
|
|
|
|
at cfg(…)
|
|
|
|
at cfg_attr(…)
|
|
|
|
at cold
|
|
|
|
at deny(…)
|
|
|
|
at deprecated
|
|
|
|
at derive(…)
|
|
|
|
at doc = "…"
|
|
|
|
at doc(alias = "…")
|
|
|
|
at doc(hidden)
|
|
|
|
at export_name = "…"
|
|
|
|
at forbid(…)
|
|
|
|
at global_allocator
|
|
|
|
at ignore = "…"
|
|
|
|
at inline
|
|
|
|
at link
|
|
|
|
at link_name = "…"
|
|
|
|
at link_section = "…"
|
|
|
|
at macro_export
|
|
|
|
at macro_use
|
|
|
|
at must_use
|
|
|
|
at no_mangle
|
|
|
|
at non_exhaustive
|
|
|
|
at panic_handler
|
|
|
|
at path = "…"
|
|
|
|
at proc_macro
|
|
|
|
at proc_macro_attribute
|
|
|
|
at proc_macro_derive(…)
|
|
|
|
at repr(…)
|
|
|
|
at should_panic
|
|
|
|
at target_feature = "…"
|
|
|
|
at test
|
|
|
|
at track_caller
|
|
|
|
at used
|
|
|
|
at warn(…)
|
2022-05-05 03:49:43 -05:00
|
|
|
kw crate::
|
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-07-15 09:27:01 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
mod cfg {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn cfg_target_endian() {
|
|
|
|
check(
|
|
|
|
r#"#[cfg(target_endian = $0"#,
|
|
|
|
expect![[r#"
|
2021-12-04 11:18:09 -06:00
|
|
|
ba big
|
2022-05-05 03:49:43 -05:00
|
|
|
ba little
|
2021-12-04 11:18:09 -06:00
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod derive {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
fn check_derive(ra_fixture: &str, expect: Expect) {
|
2021-10-19 06:50:08 -05:00
|
|
|
let actual = completion_list(ra_fixture);
|
2021-07-15 09:27:01 -05:00
|
|
|
expect.assert_eq(&actual);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn no_completion_for_incorrect_derive() {
|
2021-10-19 06:50:08 -05:00
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- minicore: derive, copy, clone, ord, eq, default, fmt
|
|
|
|
#[derive{$0)] struct Test;
|
|
|
|
"#,
|
|
|
|
expect![[]],
|
|
|
|
)
|
2021-07-15 09:27:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn empty_derive() {
|
|
|
|
check_derive(
|
2021-10-19 06:50:08 -05:00
|
|
|
r#"
|
|
|
|
//- minicore: derive, copy, clone, ord, eq, default, fmt
|
|
|
|
#[derive($0)] struct Test;
|
|
|
|
"#,
|
2021-07-15 09:27:01 -05:00
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
de Clone macro Clone
|
2021-12-04 11:18:09 -06:00
|
|
|
de Clone, Copy
|
2022-05-05 03:49:43 -05:00
|
|
|
de Default macro Default
|
2022-03-10 15:21:58 -06:00
|
|
|
de PartialEq macro PartialEq
|
2021-12-04 11:18:09 -06:00
|
|
|
de PartialEq, Eq
|
|
|
|
de PartialEq, Eq, PartialOrd, Ord
|
|
|
|
de PartialEq, PartialOrd
|
2022-05-05 03:49:43 -05:00
|
|
|
md core
|
|
|
|
kw crate::
|
2022-03-10 14:56:19 -06:00
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-10-19 06:50:08 -05:00
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn derive_with_input_before() {
|
|
|
|
check_derive(
|
2021-10-19 06:50:08 -05:00
|
|
|
r#"
|
|
|
|
//- minicore: derive, copy, clone, ord, eq, default, fmt
|
|
|
|
#[derive(serde::Serialize, PartialEq, $0)] struct Test;
|
|
|
|
"#,
|
2021-07-15 09:27:01 -05:00
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
de Clone macro Clone
|
2021-12-04 11:18:09 -06:00
|
|
|
de Clone, Copy
|
2022-05-05 03:49:43 -05:00
|
|
|
de Default macro Default
|
2021-12-04 11:18:09 -06:00
|
|
|
de Eq
|
|
|
|
de Eq, PartialOrd, Ord
|
|
|
|
de PartialOrd
|
2022-05-05 03:49:43 -05:00
|
|
|
md core
|
|
|
|
kw crate::
|
2022-03-10 14:56:19 -06:00
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-10-19 06:50:08 -05:00
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn derive_with_input_after() {
|
|
|
|
check_derive(
|
2021-10-19 06:50:08 -05:00
|
|
|
r#"
|
|
|
|
//- minicore: derive, copy, clone, ord, eq, default, fmt
|
|
|
|
#[derive($0 serde::Serialize, PartialEq)] struct Test;
|
|
|
|
"#,
|
2021-07-15 09:27:01 -05:00
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
de Clone macro Clone
|
2021-12-04 11:18:09 -06:00
|
|
|
de Clone, Copy
|
2022-05-05 03:49:43 -05:00
|
|
|
de Default macro Default
|
2021-12-04 11:18:09 -06:00
|
|
|
de Eq
|
|
|
|
de Eq, PartialOrd, Ord
|
|
|
|
de PartialOrd
|
2022-05-05 03:49:43 -05:00
|
|
|
md core
|
|
|
|
kw crate::
|
2022-03-10 14:56:19 -06:00
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-10-19 06:50:08 -05:00
|
|
|
"#]],
|
2022-03-10 15:21:58 -06:00
|
|
|
);
|
2021-07-15 09:27:01 -05:00
|
|
|
}
|
2021-10-28 12:19:30 -05:00
|
|
|
|
2022-04-18 08:34:36 -05:00
|
|
|
#[test]
|
|
|
|
fn derive_with_existing_derives() {
|
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- minicore: derive, copy, clone, ord, eq, default, fmt
|
|
|
|
#[derive(PartialEq, Eq, Or$0)] struct Test;
|
|
|
|
"#,
|
|
|
|
expect![[r#"
|
|
|
|
de Clone macro Clone
|
2022-05-05 03:49:43 -05:00
|
|
|
de Clone, Copy
|
|
|
|
de Default macro Default
|
2022-04-18 08:34:36 -05:00
|
|
|
de PartialOrd
|
2022-05-05 03:49:43 -05:00
|
|
|
de PartialOrd, Ord
|
|
|
|
md core
|
|
|
|
kw crate::
|
2022-04-18 08:34:36 -05:00
|
|
|
kw self::
|
|
|
|
kw super::
|
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-10-28 12:19:30 -05:00
|
|
|
#[test]
|
|
|
|
fn derive_flyimport() {
|
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- proc_macros: derive_identity
|
2022-03-10 13:53:50 -06:00
|
|
|
//- minicore: derive
|
2021-10-28 12:19:30 -05:00
|
|
|
#[derive(der$0)] struct Test;
|
|
|
|
"#,
|
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
de DeriveIdentity (use proc_macros::DeriveIdentity) proc_macro DeriveIdentity
|
2022-03-10 14:56:19 -06:00
|
|
|
md core
|
2022-05-05 03:49:43 -05:00
|
|
|
md proc_macros
|
|
|
|
kw crate::
|
2022-03-10 14:56:19 -06:00
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-10-28 12:19:30 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- proc_macros: derive_identity
|
2022-03-10 13:53:50 -06:00
|
|
|
//- minicore: derive
|
2021-10-28 12:19:30 -05:00
|
|
|
use proc_macros::DeriveIdentity;
|
|
|
|
#[derive(der$0)] struct Test;
|
|
|
|
"#,
|
|
|
|
expect![[r#"
|
2022-03-10 15:21:58 -06:00
|
|
|
de DeriveIdentity proc_macro DeriveIdentity
|
2022-03-10 14:56:19 -06:00
|
|
|
md core
|
2022-05-05 03:49:43 -05:00
|
|
|
md proc_macros
|
|
|
|
kw crate::
|
2022-03-10 14:56:19 -06:00
|
|
|
kw self::
|
|
|
|
kw super::
|
2021-10-28 12:19:30 -05:00
|
|
|
"#]],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn derive_flyimport_edit() {
|
|
|
|
check_edit(
|
|
|
|
"DeriveIdentity",
|
|
|
|
r#"
|
|
|
|
//- proc_macros: derive_identity
|
2022-03-10 13:53:50 -06:00
|
|
|
//- minicore: derive
|
2021-10-28 12:19:30 -05:00
|
|
|
#[derive(der$0)] struct Test;
|
|
|
|
"#,
|
|
|
|
r#"
|
|
|
|
use proc_macros::DeriveIdentity;
|
|
|
|
|
|
|
|
#[derive(DeriveIdentity)] struct Test;
|
|
|
|
"#,
|
|
|
|
);
|
|
|
|
}
|
2022-03-10 13:53:50 -06:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn qualified() {
|
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- proc_macros: derive_identity
|
|
|
|
//- minicore: derive, copy, clone
|
|
|
|
#[derive(proc_macros::$0)] struct Test;
|
|
|
|
"#,
|
2022-03-10 14:56:19 -06:00
|
|
|
expect![[r#"
|
2022-03-10 15:21:58 -06:00
|
|
|
de DeriveIdentity proc_macro DeriveIdentity
|
2022-03-10 14:56:19 -06:00
|
|
|
"#]],
|
2022-03-10 13:53:50 -06:00
|
|
|
);
|
|
|
|
check_derive(
|
|
|
|
r#"
|
|
|
|
//- proc_macros: derive_identity
|
|
|
|
//- minicore: derive, copy, clone
|
|
|
|
#[derive(proc_macros::C$0)] struct Test;
|
|
|
|
"#,
|
2022-03-10 14:56:19 -06:00
|
|
|
expect![[r#"
|
2022-03-10 15:21:58 -06:00
|
|
|
de DeriveIdentity proc_macro DeriveIdentity
|
2022-03-10 14:56:19 -06:00
|
|
|
"#]],
|
2022-03-10 13:53:50 -06:00
|
|
|
);
|
|
|
|
}
|
2021-07-15 09:27:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
mod lint {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_empty() {
|
|
|
|
check_edit(
|
|
|
|
"deprecated",
|
|
|
|
r#"#[allow($0)] struct Test;"#,
|
|
|
|
r#"#[allow(deprecated)] struct Test;"#,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_with_existing() {
|
|
|
|
check_edit(
|
|
|
|
"deprecated",
|
|
|
|
r#"#[allow(keyword_idents, $0)] struct Test;"#,
|
|
|
|
r#"#[allow(keyword_idents, deprecated)] struct Test;"#,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_qualified() {
|
|
|
|
check_edit(
|
|
|
|
"deprecated",
|
|
|
|
r#"#[allow(keyword_idents, $0)] struct Test;"#,
|
|
|
|
r#"#[allow(keyword_idents, deprecated)] struct Test;"#,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_feature() {
|
|
|
|
check_edit(
|
|
|
|
"box_syntax",
|
|
|
|
r#"#[feature(box_$0)] struct Test;"#,
|
|
|
|
r#"#[feature(box_syntax)] struct Test;"#,
|
|
|
|
)
|
|
|
|
}
|
2021-10-17 05:58:37 -05:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_clippy_unqualified() {
|
|
|
|
check_edit(
|
|
|
|
"clippy::as_conversions",
|
|
|
|
r#"#[allow($0)] struct Test;"#,
|
|
|
|
r#"#[allow(clippy::as_conversions)] struct Test;"#,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_clippy_qualified() {
|
|
|
|
check_edit(
|
2021-10-20 07:03:41 -05:00
|
|
|
"as_conversions",
|
2021-10-17 05:58:37 -05:00
|
|
|
r#"#[allow(clippy::$0)] struct Test;"#,
|
|
|
|
r#"#[allow(clippy::as_conversions)] struct Test;"#,
|
|
|
|
);
|
|
|
|
}
|
2021-10-20 07:03:41 -05:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_rustdoc_unqualified() {
|
|
|
|
check_edit(
|
|
|
|
"rustdoc::bare_urls",
|
|
|
|
r#"#[allow($0)] struct Test;"#,
|
|
|
|
r#"#[allow(rustdoc::bare_urls)] struct Test;"#,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_rustdoc_qualified() {
|
|
|
|
check_edit(
|
|
|
|
"bare_urls",
|
|
|
|
r#"#[allow(rustdoc::$0)] struct Test;"#,
|
|
|
|
r#"#[allow(rustdoc::bare_urls)] struct Test;"#,
|
|
|
|
);
|
|
|
|
}
|
2021-12-11 08:55:25 -06:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn lint_unclosed() {
|
|
|
|
check_edit(
|
|
|
|
"deprecated",
|
|
|
|
r#"#[allow(dep$0 struct Test;"#,
|
|
|
|
r#"#[allow(deprecated struct Test;"#,
|
|
|
|
);
|
|
|
|
check_edit(
|
|
|
|
"bare_urls",
|
|
|
|
r#"#[allow(rustdoc::$0 struct Test;"#,
|
|
|
|
r#"#[allow(rustdoc::bare_urls struct Test;"#,
|
|
|
|
);
|
|
|
|
}
|
2021-07-15 09:27:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
mod repr {
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
fn check_repr(ra_fixture: &str, expect: Expect) {
|
|
|
|
let actual = completion_list(ra_fixture);
|
|
|
|
expect.assert_eq(&actual);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn no_completion_for_incorrect_repr() {
|
|
|
|
check_repr(r#"#[repr{$0)] struct Test;"#, expect![[]])
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn empty() {
|
|
|
|
check_repr(
|
|
|
|
r#"#[repr($0)] struct Test;"#,
|
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
ba C
|
2021-12-04 11:18:09 -06:00
|
|
|
ba align($0)
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i16
|
|
|
|
ba i28
|
|
|
|
ba i32
|
|
|
|
ba i64
|
|
|
|
ba i8
|
|
|
|
ba isize
|
2021-12-04 11:18:09 -06:00
|
|
|
ba packed
|
|
|
|
ba transparent
|
2022-05-05 03:49:43 -05:00
|
|
|
ba u128
|
2021-12-04 11:18:09 -06:00
|
|
|
ba u16
|
|
|
|
ba u32
|
|
|
|
ba u64
|
2022-05-05 03:49:43 -05:00
|
|
|
ba u8
|
2021-12-04 11:18:09 -06:00
|
|
|
ba usize
|
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn transparent() {
|
|
|
|
check_repr(r#"#[repr(transparent, $0)] struct Test;"#, expect![[r#""#]]);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn align() {
|
|
|
|
check_repr(
|
|
|
|
r#"#[repr(align(1), $0)] struct Test;"#,
|
|
|
|
expect![[r#"
|
2021-12-04 11:18:09 -06:00
|
|
|
ba C
|
|
|
|
ba i16
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i28
|
2021-12-04 11:18:09 -06:00
|
|
|
ba i32
|
|
|
|
ba i64
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i8
|
2021-12-04 11:18:09 -06:00
|
|
|
ba isize
|
2022-05-05 03:49:43 -05:00
|
|
|
ba transparent
|
|
|
|
ba u128
|
|
|
|
ba u16
|
|
|
|
ba u32
|
|
|
|
ba u64
|
|
|
|
ba u8
|
|
|
|
ba usize
|
2021-12-04 11:18:09 -06:00
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn packed() {
|
|
|
|
check_repr(
|
|
|
|
r#"#[repr(packed, $0)] struct Test;"#,
|
|
|
|
expect![[r#"
|
2021-12-04 11:18:09 -06:00
|
|
|
ba C
|
|
|
|
ba i16
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i28
|
2021-12-04 11:18:09 -06:00
|
|
|
ba i32
|
|
|
|
ba i64
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i8
|
2021-12-04 11:18:09 -06:00
|
|
|
ba isize
|
2022-05-05 03:49:43 -05:00
|
|
|
ba transparent
|
|
|
|
ba u128
|
|
|
|
ba u16
|
|
|
|
ba u32
|
|
|
|
ba u64
|
|
|
|
ba u8
|
|
|
|
ba usize
|
2021-12-04 11:18:09 -06:00
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn c() {
|
|
|
|
check_repr(
|
|
|
|
r#"#[repr(C, $0)] struct Test;"#,
|
|
|
|
expect![[r#"
|
2021-12-04 11:18:09 -06:00
|
|
|
ba align($0)
|
2022-05-05 03:49:43 -05:00
|
|
|
ba i16
|
|
|
|
ba i28
|
|
|
|
ba i32
|
|
|
|
ba i64
|
|
|
|
ba i8
|
|
|
|
ba isize
|
2021-12-04 11:18:09 -06:00
|
|
|
ba packed
|
2022-05-05 03:49:43 -05:00
|
|
|
ba u128
|
2021-12-04 11:18:09 -06:00
|
|
|
ba u16
|
|
|
|
ba u32
|
|
|
|
ba u64
|
2022-05-05 03:49:43 -05:00
|
|
|
ba u8
|
2021-12-04 11:18:09 -06:00
|
|
|
ba usize
|
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn prim() {
|
|
|
|
check_repr(
|
|
|
|
r#"#[repr(usize, $0)] struct Test;"#,
|
|
|
|
expect![[r#"
|
2022-05-05 03:49:43 -05:00
|
|
|
ba C
|
2021-12-04 11:18:09 -06:00
|
|
|
ba align($0)
|
|
|
|
ba packed
|
|
|
|
"#]],
|
2021-07-15 09:27:01 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|