File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed
compiler-core/src/language_server/tests Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -10715,24 +10715,6 @@ pub fn main() -> Nil {
10715
10715
) ;
10716
10716
}
10717
10717
10718
- #[ test]
10719
- fn annotate_all_top_level_definitions_dont_affect_local_vars( ) {
10720
- assert_code_action ! (
10721
- ANNOTATE_TOP_LEVEL_DEFINITIONS ,
10722
- r#"
10723
- pub const answer = 42
10724
-
10725
- pub fn add_two(thing) {
10726
- thing + 2
10727
-
10728
- pub fn add_one(thing) {
10729
- let result = thing + 1
10730
- result
10731
- }
10732
- "# ,
10733
- find_position_of( "fn" ) . select_until( find_position_of( "(" ) ) ;
10734
- }
10735
-
10736
10718
#[ test]
10737
10719
fn annotate_all_top_level_definitions_constant ( ) {
10738
10720
assert_code_action ! (
@@ -10755,20 +10737,21 @@ pub fn add_one(thing) {
10755
10737
#[ test]
10756
10738
fn annotate_all_top_level_definitions_function ( ) {
10757
10739
assert_code_action ! (
10758
- ANNOTATE_TOP_LEVEL_TYPE_DEFINITIONS ,
10740
+ ANNOTATE_TOP_LEVEL_DEFINITIONS ,
10759
10741
r#"
10760
10742
pub fn add_two(thing) {
10761
- thing + 2
10743
+ thing + 2
10762
10744
}
10763
10745
10764
10746
pub fn add_one(thing) {
10765
- thing + 1
10747
+ thing + 1
10766
10748
}
10767
- "#,
10749
+ "# ,
10768
10750
find_position_of( "fn" ) . select_until( find_position_of( "(" ) )
10769
10751
) ;
10770
10752
}
10771
10753
10754
+ #[ test]
10772
10755
fn annotate_all_top_level_definitions_already_annotated ( ) {
10773
10756
assert_no_code_actions ! (
10774
10757
ANNOTATE_TOP_LEVEL_DEFINITIONS ,
You can’t perform that action at this time.
0 commit comments