File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
crates/ide_assists/src/handlers Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -938,6 +938,47 @@ struct Foo(usize);
938
938
impl FooB for Foo {
939
939
$0fn foo< 'lt>(& 'lt self){}
940
940
941
+ }
942
+ "# ,
943
+ )
944
+ }
945
+
946
+ #[ test]
947
+ fn macro_trait_dyn_absolute_path ( ) {
948
+ // https://github.com/rust-analyzer/rust-analyzer/issues/11100
949
+ check_assist (
950
+ add_missing_impl_members,
951
+ r#"
952
+ macro_rules! foo {
953
+ () => {
954
+ trait MacroTrait {
955
+ fn trait_method(_: &dyn ::core::marker::Sized);
956
+ }
957
+ }
958
+ }
959
+ foo!();
960
+ struct Foo;
961
+
962
+ impl MacroTrait for Foo {
963
+ $0
964
+ }
965
+ "# ,
966
+ r#"
967
+ macro_rules! foo {
968
+ () => {
969
+ trait MacroTrait {
970
+ fn trait_method(_: &dyn ::core::marker::Sized);
971
+ }
972
+ }
973
+ }
974
+ foo!();
975
+ struct Foo;
976
+
977
+ impl MacroTrait for Foo {
978
+ fn trait_method(_: &dyn ::core::marker::Sized) {
979
+ ${0:todo!()}
980
+ }
981
+
941
982
}
942
983
"# ,
943
984
)
You can’t perform that action at this time.
0 commit comments