Add failing test case for issue 11100

This commit is contained in:
Jonas Platte 2022-01-05 18:04:36 +01:00
parent 67f3b51edb
commit f5b789b1dc
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -938,6 +938,47 @@ fn foo<'lt>(&'lt self) {}
impl FooB for Foo {
$0fn foo< 'lt>(& 'lt self){}
}
"#,
)
}
#[test]
fn macro_trait_dyn_absolute_path() {
// https://github.com/rust-analyzer/rust-analyzer/issues/11100
check_assist(
add_missing_impl_members,
r#"
macro_rules! foo {
() => {
trait MacroTrait {
fn trait_method(_: &dyn ::core::marker::Sized);
}
}
}
foo!();
struct Foo;
impl MacroTrait for Foo {
$0
}
"#,
r#"
macro_rules! foo {
() => {
trait MacroTrait {
fn trait_method(_: &dyn ::core::marker::Sized);
}
}
}
foo!();
struct Foo;
impl MacroTrait for Foo {
fn trait_method(_: &dyn ::core::marker::Sized) {
${0:todo!()}
}
}
"#,
)