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 @@ -10639,24 +10639,6 @@ fn wibble(f: fn() -> Float) -> Float { f() }
10639
10639
) ;
10640
10640
}
10641
10641
10642
- #[ test]
10643
- fn annotate_all_top_level_definitions_dont_affect_local_vars( ) {
10644
- assert_code_action ! (
10645
- ANNOTATE_TOP_LEVEL_DEFINITIONS ,
10646
- r#"
10647
- pub const answer = 42
10648
-
10649
- pub fn add_two(thing) {
10650
- thing + 2
10651
-
10652
- pub fn add_one(thing) {
10653
- let result = thing + 1
10654
- result
10655
- }
10656
- "# ,
10657
- find_position_of( "fn" ) . select_until( find_position_of( "(" ) ) ;
10658
- }
10659
-
10660
10642
#[ test]
10661
10643
fn annotate_all_top_level_definitions_constant ( ) {
10662
10644
assert_code_action ! (
@@ -10679,20 +10661,21 @@ pub fn add_one(thing) {
10679
10661
#[ test]
10680
10662
fn annotate_all_top_level_definitions_function ( ) {
10681
10663
assert_code_action ! (
10682
- ANNOTATE_TOP_LEVEL_TYPE_DEFINITIONS ,
10664
+ ANNOTATE_TOP_LEVEL_DEFINITIONS ,
10683
10665
r#"
10684
10666
pub fn add_two(thing) {
10685
- thing + 2
10667
+ thing + 2
10686
10668
}
10687
10669
10688
10670
pub fn add_one(thing) {
10689
- thing + 1
10671
+ thing + 1
10690
10672
}
10691
- "#,
10673
+ "# ,
10692
10674
find_position_of( "fn" ) . select_until( find_position_of( "(" ) )
10693
10675
) ;
10694
10676
}
10695
10677
10678
+ #[ test]
10696
10679
fn annotate_all_top_level_definitions_already_annotated ( ) {
10697
10680
assert_no_code_actions ! (
10698
10681
ANNOTATE_TOP_LEVEL_DEFINITIONS ,
You can’t perform that action at this time.
0 commit comments