aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorivan770 <[email protected]>2021-02-15 14:09:50 +0000
committerivan770 <[email protected]>2021-02-15 14:09:50 +0000
commit66de90b85aa98b841874e95d6cc8bb6b84f43133 (patch)
tree2d00b5047232afac8b8e1746f962c1dde7126b6c /crates
parent7435b9e98c9280043605748c11a1f450669e04d6 (diff)
Actually fix runnable order
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/annotations.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs
index 414a60bed..2e8e82b70 100644
--- a/crates/ide/src/annotations.rs
+++ b/crates/ide/src/annotations.rs
@@ -57,19 +57,19 @@ pub(crate) fn annotations(
57 let action = runnable.action(); 57 let action = runnable.action();
58 let range = runnable.nav.full_range; 58 let range = runnable.nav.full_range;
59 59
60 if action.debugee && config.debug { 60 if config.run {
61 annotations.push(Annotation { 61 annotations.push(Annotation {
62 range, 62 range,
63 63
64 // FIXME: This one allocates without reason if run is enabled, but debug is disabled 64 // FIXME: This one allocates without reason if run is enabled, but debug is disabled
65 kind: AnnotationKind::Runnable { debug: true, runnable: runnable.clone() }, 65 kind: AnnotationKind::Runnable { debug: false, runnable: runnable.clone() },
66 }); 66 });
67 } 67 }
68 68
69 if config.run { 69 if action.debugee && config.debug {
70 annotations.push(Annotation { 70 annotations.push(Annotation {
71 range, 71 range,
72 kind: AnnotationKind::Runnable { debug: false, runnable }, 72 kind: AnnotationKind::Runnable { debug: true, runnable },
73 }); 73 });
74 } 74 }
75 } 75 }
@@ -199,7 +199,7 @@ fn main() {
199 Annotation { 199 Annotation {
200 range: 50..85, 200 range: 50..85,
201 kind: Runnable { 201 kind: Runnable {
202 debug: true, 202 debug: false,
203 runnable: Runnable { 203 runnable: Runnable {
204 nav: NavigationTarget { 204 nav: NavigationTarget {
205 file_id: FileId( 205 file_id: FileId(
@@ -218,7 +218,7 @@ fn main() {
218 Annotation { 218 Annotation {
219 range: 50..85, 219 range: 50..85,
220 kind: Runnable { 220 kind: Runnable {
221 debug: false, 221 debug: true,
222 runnable: Runnable { 222 runnable: Runnable {
223 nav: NavigationTarget { 223 nav: NavigationTarget {
224 file_id: FileId( 224 file_id: FileId(
@@ -303,7 +303,7 @@ fn main() {
303 Annotation { 303 Annotation {
304 range: 14..48, 304 range: 14..48,
305 kind: Runnable { 305 kind: Runnable {
306 debug: true, 306 debug: false,
307 runnable: Runnable { 307 runnable: Runnable {
308 nav: NavigationTarget { 308 nav: NavigationTarget {
309 file_id: FileId( 309 file_id: FileId(
@@ -322,7 +322,7 @@ fn main() {
322 Annotation { 322 Annotation {
323 range: 14..48, 323 range: 14..48,
324 kind: Runnable { 324 kind: Runnable {
325 debug: false, 325 debug: true,
326 runnable: Runnable { 326 runnable: Runnable {
327 nav: NavigationTarget { 327 nav: NavigationTarget {
328 file_id: FileId( 328 file_id: FileId(
@@ -411,7 +411,7 @@ fn main() {
411 Annotation { 411 Annotation {
412 range: 66..100, 412 range: 66..100,
413 kind: Runnable { 413 kind: Runnable {
414 debug: true, 414 debug: false,
415 runnable: Runnable { 415 runnable: Runnable {
416 nav: NavigationTarget { 416 nav: NavigationTarget {
417 file_id: FileId( 417 file_id: FileId(
@@ -430,7 +430,7 @@ fn main() {
430 Annotation { 430 Annotation {
431 range: 66..100, 431 range: 66..100,
432 kind: Runnable { 432 kind: Runnable {
433 debug: false, 433 debug: true,
434 runnable: Runnable { 434 runnable: Runnable {
435 nav: NavigationTarget { 435 nav: NavigationTarget {
436 file_id: FileId( 436 file_id: FileId(
@@ -572,7 +572,7 @@ fn main() {}
572 Annotation { 572 Annotation {
573 range: 0..12, 573 range: 0..12,
574 kind: Runnable { 574 kind: Runnable {
575 debug: true, 575 debug: false,
576 runnable: Runnable { 576 runnable: Runnable {
577 nav: NavigationTarget { 577 nav: NavigationTarget {
578 file_id: FileId( 578 file_id: FileId(
@@ -591,7 +591,7 @@ fn main() {}
591 Annotation { 591 Annotation {
592 range: 0..12, 592 range: 0..12,
593 kind: Runnable { 593 kind: Runnable {
594 debug: false, 594 debug: true,
595 runnable: Runnable { 595 runnable: Runnable {
596 nav: NavigationTarget { 596 nav: NavigationTarget {
597 file_id: FileId( 597 file_id: FileId(
@@ -645,7 +645,7 @@ fn main() {
645 Annotation { 645 Annotation {
646 range: 58..95, 646 range: 58..95,
647 kind: Runnable { 647 kind: Runnable {
648 debug: true, 648 debug: false,
649 runnable: Runnable { 649 runnable: Runnable {
650 nav: NavigationTarget { 650 nav: NavigationTarget {
651 file_id: FileId( 651 file_id: FileId(
@@ -664,7 +664,7 @@ fn main() {
664 Annotation { 664 Annotation {
665 range: 58..95, 665 range: 58..95,
666 kind: Runnable { 666 kind: Runnable {
667 debug: false, 667 debug: true,
668 runnable: Runnable { 668 runnable: Runnable {
669 nav: NavigationTarget { 669 nav: NavigationTarget {
670 file_id: FileId( 670 file_id: FileId(
@@ -787,7 +787,7 @@ mod tests {
787 Annotation { 787 Annotation {
788 range: 0..12, 788 range: 0..12,
789 kind: Runnable { 789 kind: Runnable {
790 debug: true, 790 debug: false,
791 runnable: Runnable { 791 runnable: Runnable {
792 nav: NavigationTarget { 792 nav: NavigationTarget {
793 file_id: FileId( 793 file_id: FileId(
@@ -806,7 +806,7 @@ mod tests {
806 Annotation { 806 Annotation {
807 range: 0..12, 807 range: 0..12,
808 kind: Runnable { 808 kind: Runnable {
809 debug: false, 809 debug: true,
810 runnable: Runnable { 810 runnable: Runnable {
811 nav: NavigationTarget { 811 nav: NavigationTarget {
812 file_id: FileId( 812 file_id: FileId(
@@ -825,7 +825,7 @@ mod tests {
825 Annotation { 825 Annotation {
826 range: 14..64, 826 range: 14..64,
827 kind: Runnable { 827 kind: Runnable {
828 debug: true, 828 debug: false,
829 runnable: Runnable { 829 runnable: Runnable {
830 nav: NavigationTarget { 830 nav: NavigationTarget {
831 file_id: FileId( 831 file_id: FileId(
@@ -846,7 +846,7 @@ mod tests {
846 Annotation { 846 Annotation {
847 range: 14..64, 847 range: 14..64,
848 kind: Runnable { 848 kind: Runnable {
849 debug: false, 849 debug: true,
850 runnable: Runnable { 850 runnable: Runnable {
851 nav: NavigationTarget { 851 nav: NavigationTarget {
852 file_id: FileId( 852 file_id: FileId(
@@ -867,7 +867,7 @@ mod tests {
867 Annotation { 867 Annotation {
868 range: 30..62, 868 range: 30..62,
869 kind: Runnable { 869 kind: Runnable {
870 debug: true, 870 debug: false,
871 runnable: Runnable { 871 runnable: Runnable {
872 nav: NavigationTarget { 872 nav: NavigationTarget {
873 file_id: FileId( 873 file_id: FileId(
@@ -893,7 +893,7 @@ mod tests {
893 Annotation { 893 Annotation {
894 range: 30..62, 894 range: 30..62,
895 kind: Runnable { 895 kind: Runnable {
896 debug: false, 896 debug: true,
897 runnable: Runnable { 897 runnable: Runnable {
898 nav: NavigationTarget { 898 nav: NavigationTarget {
899 file_id: FileId( 899 file_id: FileId(