rustfmt losing comments, weird-exprs edition
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
given rusts infamous tests/ui/expr/weird-exprs.rs
//@ run-pass
#![feature(coroutines)]
#![allow(non_camel_case_types)]
#![allow(dead_code)]
#![allow(redundant_semicolons)]
#![allow(unreachable_code)]
#![allow(unused_braces, unused_must_use, unused_parens)]
#![allow(uncommon_codepoints, confusable_idents)]
#![allow(unused_imports)]
#![allow(unreachable_patterns)]
#![recursion_limit = "256"]
extern crate core;
use std::cell::Cell;
use std::mem::swap;
use std::ops::Deref;
// Just a grab bag of stuff that you wouldn't want to actually write.
fn strange() -> bool { let _x: bool = return true; }
fn funny() {
fn f(_x: ()) { }
f(return);
}
fn what() {
fn the(x: &Cell<bool>) {
return while !x.get() { x.set(true); };
}
let i = &Cell::new(false);
let dont = {||the(i)};
dont();
assert!(i.get());
}
fn zombiejesus() {
loop {
while (return) {
if (return) {
match (return) {
1 => {
if (return) {
return
} else {
return
}
}
_ => { return }
};
} else if (return) {
return;
}
}
if (return) { break; }
}
}
fn notsure() {
let mut _x: isize;
let mut _y = (_x = 0) == (_x = 0);
let mut _z = (_x = 0) < (_x = 0);
let _a = (_x += 0) == (_x = 0);
let _b = swap(&mut _y, &mut _z) == swap(&mut _y, &mut _z);
}
fn canttouchthis() -> usize {
fn p() -> bool { true }
let _a = (assert!(true) == (assert!(p())));
let _c = (assert!(p()) == ());
let _b: bool = (println!("{}", 0) == (return 0));
}
fn angrydome() {
loop { if break { } }
let mut i = 0;
loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => panic!("wat") } }
break; }
}
fn evil_lincoln() { let _evil: () = println!("lincoln"); }
fn dots() {
assert_eq!(String::from(".................................................."),
format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. ..
.. .. .. .. .. .. .. .. .. .. .. ..));
}
fn u8(u8: u8) {
if u8 != 0u8 {
assert_eq!(8u8, {
macro_rules! u8 {
(u8) => {
mod u8 {
pub fn u8<'u8: 'u8 + 'u8>(u8: &'u8 u8) -> &'u8 u8 {
"u8";
u8
}
}
};
}
u8!(u8);
let &u8: &u8 = u8::u8(&8u8);
crate::u8(0u8);
u8
});
}
}
fn fishy() {
assert_eq!(String::from("><>"),
String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
}
fn union() {
union union<'union> { union: &'union union<'union>, }
}
fn special_characters() {
let val = !((|(..):(_,_),(|__@_|__)|__)((&*"\\",'π€')/**/,{})=={&[..=..][..];})//
;
assert!(!val);
}
fn punch_card() -> impl std::fmt::Debug {
..=..=.. .. .. .. .. .. .. .. .. .. .. .. .. ..
..=.. ..=.. .. .. .. .. .. .. .. .. .. ..=.. ..
..=.. ..=.. ..=.. ..=.. .. ..=..=.. ..=..=..=..
..=..=.. .. ..=.. ..=.. ..=.. .. .. .. ..=.. ..
..=.. ..=.. ..=.. ..=.. .. ..=.. .. .. ..=.. ..
..=.. ..=.. ..=.. ..=.. .. .. ..=.. .. ..=.. ..
..=.. ..=.. .. ..=..=.. ..=..=.. .. .. ..=..=..
}
fn r#match() {
let val: () = match match match match match () {
() => ()
} {
() => ()
} {
() => ()
} {
() => ()
} {
() => ()
};
assert_eq!(val, ());
}
fn i_yield() {
#[coroutine]
static || {
yield yield yield yield yield yield yield yield yield;
};
}
fn match_nested_if() {
let val = match () {
() if if if if true {true} else {false} {true} else {false} {true} else {false} => true,
_ => false,
};
assert!(val);
}
fn monkey_barrel() {
let val: () = ()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=();
assert_eq!(val, ());
}
fn ππππππππ() {
type ππππ = i32;
fn πππππ() -> ππππ {
let ππππππ = 42;
return ππππππ;
}
assert_eq!(loop {
break πππππ ();
}, 42);
}
fn function() {
struct foo;
impl Deref for foo {
type Target = fn() -> Self;
fn deref(&self) -> &Self::Target {
&((|| foo) as _)
}
}
let foo = foo () ()() ()()() ()()()() ()()()()();
}
fn bathroom_stall() {
let mut i = 1;
matches!(2, _|_|_|_|_|_ if (i+=1) != (i+=1));
assert_eq!(i, 13);
}
fn closure_matching() {
let x = |_| Some(1);
let (|x| x) = match x(..) {
|_| Some(2) => |_| Some(3),
|_| _ => unreachable!(),
};
assert!(matches!(x(..), |_| Some(4)));
}
fn semisemisemisemisemi() {
;;;;;;; ;;;;;;; ;;; ;;; ;;
;; ;; ;;;; ;;;; ;;
;;;;;;; ;;;;; ;; ;;;; ;; ;;
;; ;; ;; ;; ;; ;;
;;;;;;; ;;;;;;; ;; ;; ;;
}
fn useful_syntax() {
use {{std::{{collections::{{HashMap}}}}}};
use ::{{{{core}, {std}}}};
use {{::{{core as core2}}}};
}
fn infcx() {
pub mod cx {
pub mod cx {
pub use super::cx;
pub struct Cx;
}
}
let _cx: cx::cx::Cx = cx::cx::cx::cx::cx::Cx;
}
fn return_already() -> impl std::fmt::Debug {
loop {
return !!!!!!!
break !!!!!!1111
}
}
fn fake_macros() -> impl std::fmt::Debug {
loop {
if! {
match! (
break! {
return! {
1337
}
}
)
{}
}
{}
}
}
fn fish_fight() {
trait Rope {
fn _____________<U>(_: Self, _: U) where Self: Sized {}
}
struct T;
impl Rope for T {}
fn tug_o_war(_: impl Fn(T, T)) {}
tug_o_war(<T>::_____________::<T>);
}
pub fn main() {
strange();
funny();
what();
zombiejesus();
notsure();
canttouchthis();
angrydome();
evil_lincoln();
dots();
u8(8u8);
fishy();
union();
special_characters();
punch_card();
r#match();
i_yield();
match_nested_if();
monkey_barrel();
ππππππππ();
function();
bathroom_stall();
closure_matching();
semisemisemisemisemi();
useful_syntax();
infcx();
return_already();
fake_macros();
fish_fight();
}
we can take that and inject comments into it.
My idea is to just replace every space with /**/ and see what gets "lost" by rustfmt.
Gemini got me a script that would enumerate and inject these comments:
awk -v count=0 '{
out = ""
for (i=1; i<=length($0); i++) {
char = substr($0, i, 1)
if (char == " ") {
count++
out = out " /* " count " */ "
} else {
out = out char
}
}
print out
}' input.rs > output.rs
if we run this we end up with
//@ /* 1 */ run-pass
#![feature(coroutines)]
#![allow(non_camel_case_types)]
#![allow(dead_code)]
#![allow(redundant_semicolons)]
#![allow(unreachable_code)]
#![allow(unused_braces, /* 2 */ unused_must_use, /* 3 */ unused_parens)]
#![allow(uncommon_codepoints, /* 4 */ confusable_idents)]
#![allow(unused_imports)]
#![allow(unreachable_patterns)]
#![recursion_limit /* 5 */ = /* 6 */ "256"]
extern /* 7 */ crate /* 8 */ core;
use /* 9 */ std::cell::Cell;
use /* 10 */ std::mem::swap;
use /* 11 */ std::ops::Deref;
// /* 12 */ Just /* 13 */ a /* 14 */ grab /* 15 */ bag /* 16 */ of /* 17 */ stuff /* 18 */ that /* 19 */ you /* 20 */ wouldn't /* 21 */ want /* 22 */ to /* 23 */ actually /* 24 */ write.
fn /* 25 */ strange() /* 26 */ -> /* 27 */ bool /* 28 */ { /* 29 */ let /* 30 */ _x: /* 31 */ bool /* 32 */ = /* 33 */ return /* 34 */ true; /* 35 */ }
fn /* 36 */ funny() /* 37 */ {
/* 38 */ /* 39 */ /* 40 */ /* 41 */ fn /* 42 */ f(_x: /* 43 */ ()) /* 44 */ { /* 45 */ }
/* 46 */ /* 47 */ /* 48 */ /* 49 */ f(return);
}
fn /* 50 */ what() /* 51 */ {
/* 52 */ /* 53 */ /* 54 */ /* 55 */ fn /* 56 */ the(x: /* 57 */ &Cell<bool>) /* 58 */ {
/* 59 */ /* 60 */ /* 61 */ /* 62 */ /* 63 */ /* 64 */ /* 65 */ /* 66 */ return /* 67 */ while /* 68 */ !x.get() /* 69 */ { /* 70 */ x.set(true); /* 71 */ };
/* 72 */ /* 73 */ /* 74 */ /* 75 */ }
/* 76 */ /* 77 */ /* 78 */ /* 79 */ let /* 80 */ i /* 81 */ = /* 82 */ &Cell::new(false);
/* 83 */ /* 84 */ /* 85 */ /* 86 */ let /* 87 */ dont /* 88 */ = /* 89 */ {||the(i)};
/* 90 */ /* 91 */ /* 92 */ /* 93 */ dont();
/* 94 */ /* 95 */ /* 96 */ /* 97 */ assert!(i.get());
}
fn /* 98 */ zombiejesus() /* 99 */ {
/* 100 */ /* 101 */ /* 102 */ /* 103 */ loop /* 104 */ {
/* 105 */ /* 106 */ /* 107 */ /* 108 */ /* 109 */ /* 110 */ /* 111 */ /* 112 */ while /* 113 */ (return) /* 114 */ {
/* 115 */ /* 116 */ /* 117 */ /* 118 */ /* 119 */ /* 120 */ /* 121 */ /* 122 */ /* 123 */ /* 124 */ /* 125 */ /* 126 */ if /* 127 */ (return) /* 128 */ {
/* 129 */ /* 130 */ /* 131 */ /* 132 */ /* 133 */ /* 134 */ /* 135 */ /* 136 */ /* 137 */ /* 138 */ /* 139 */ /* 140 */ /* 141 */ /* 142 */ /* 143 */ /* 144 */ match /* 145 */ (return) /* 146 */ {
/* 147 */ /* 148 */ /* 149 */ /* 150 */ /* 151 */ /* 152 */ /* 153 */ /* 154 */ /* 155 */ /* 156 */ /* 157 */ /* 158 */ /* 159 */ /* 160 */ /* 161 */ /* 162 */ /* 163 */ /* 164 */ /* 165 */ /* 166 */ 1 /* 167 */ => /* 168 */ {
/* 169 */ /* 170 */ /* 171 */ /* 172 */ /* 173 */ /* 174 */ /* 175 */ /* 176 */ /* 177 */ /* 178 */ /* 179 */ /* 180 */ /* 181 */ /* 182 */ /* 183 */ /* 184 */ /* 185 */ /* 186 */ /* 187 */ /* 188 */ /* 189 */ /* 190 */ /* 191 */ /* 192 */ if /* 193 */ (return) /* 194 */ {
/* 195 */ /* 196 */ /* 197 */ /* 198 */ /* 199 */ /* 200 */ /* 201 */ /* 202 */ /* 203 */ /* 204 */ /* 205 */ /* 206 */ /* 207 */ /* 208 */ /* 209 */ /* 210 */ /* 211 */ /* 212 */ /* 213 */ /* 214 */ /* 215 */ /* 216 */ /* 217 */ /* 218 */ /* 219 */ /* 220 */ /* 221 */ /* 222 */ return
/* 223 */ /* 224 */ /* 225 */ /* 226 */ /* 227 */ /* 228 */ /* 229 */ /* 230 */ /* 231 */ /* 232 */ /* 233 */ /* 234 */ /* 235 */ /* 236 */ /* 237 */ /* 238 */ /* 239 */ /* 240 */ /* 241 */ /* 242 */ /* 243 */ /* 244 */ /* 245 */ /* 246 */ } /* 247 */ else /* 248 */ {
/* 249 */ /* 250 */ /* 251 */ /* 252 */ /* 253 */ /* 254 */ /* 255 */ /* 256 */ /* 257 */ /* 258 */ /* 259 */ /* 260 */ /* 261 */ /* 262 */ /* 263 */ /* 264 */ /* 265 */ /* 266 */ /* 267 */ /* 268 */ /* 269 */ /* 270 */ /* 271 */ /* 272 */ /* 273 */ /* 274 */ /* 275 */ /* 276 */ return
/* 277 */ /* 278 */ /* 279 */ /* 280 */ /* 281 */ /* 282 */ /* 283 */ /* 284 */ /* 285 */ /* 286 */ /* 287 */ /* 288 */ /* 289 */ /* 290 */ /* 291 */ /* 292 */ /* 293 */ /* 294 */ /* 295 */ /* 296 */ /* 297 */ /* 298 */ /* 299 */ /* 300 */ }
/* 301 */ /* 302 */ /* 303 */ /* 304 */ /* 305 */ /* 306 */ /* 307 */ /* 308 */ /* 309 */ /* 310 */ /* 311 */ /* 312 */ /* 313 */ /* 314 */ /* 315 */ /* 316 */ /* 317 */ /* 318 */ /* 319 */ /* 320 */ }
/* 321 */ /* 322 */ /* 323 */ /* 324 */ /* 325 */ /* 326 */ /* 327 */ /* 328 */ /* 329 */ /* 330 */ /* 331 */ /* 332 */ /* 333 */ /* 334 */ /* 335 */ /* 336 */ /* 337 */ /* 338 */ /* 339 */ /* 340 */ _ /* 341 */ => /* 342 */ { /* 343 */ return /* 344 */ }
/* 345 */ /* 346 */ /* 347 */ /* 348 */ /* 349 */ /* 350 */ /* 351 */ /* 352 */ /* 353 */ /* 354 */ /* 355 */ /* 356 */ /* 357 */ /* 358 */ /* 359 */ /* 360 */ };
/* 361 */ /* 362 */ /* 363 */ /* 364 */ /* 365 */ /* 366 */ /* 367 */ /* 368 */ /* 369 */ /* 370 */ /* 371 */ /* 372 */ } /* 373 */ else /* 374 */ if /* 375 */ (return) /* 376 */ {
/* 377 */ /* 378 */ /* 379 */ /* 380 */ /* 381 */ /* 382 */ /* 383 */ /* 384 */ /* 385 */ /* 386 */ /* 387 */ /* 388 */ /* 389 */ /* 390 */ /* 391 */ /* 392 */ return;
/* 393 */ /* 394 */ /* 395 */ /* 396 */ /* 397 */ /* 398 */ /* 399 */ /* 400 */ /* 401 */ /* 402 */ /* 403 */ /* 404 */ }
/* 405 */ /* 406 */ /* 407 */ /* 408 */ /* 409 */ /* 410 */ /* 411 */ /* 412 */ }
/* 413 */ /* 414 */ /* 415 */ /* 416 */ /* 417 */ /* 418 */ /* 419 */ /* 420 */ if /* 421 */ (return) /* 422 */ { /* 423 */ break; /* 424 */ }
/* 425 */ /* 426 */ /* 427 */ /* 428 */ }
}
fn /* 429 */ notsure() /* 430 */ {
/* 431 */ /* 432 */ /* 433 */ /* 434 */ let /* 435 */ mut /* 436 */ _x: /* 437 */ isize;
/* 438 */ /* 439 */ /* 440 */ /* 441 */ let /* 442 */ mut /* 443 */ _y /* 444 */ = /* 445 */ (_x /* 446 */ = /* 447 */ 0) /* 448 */ == /* 449 */ (_x /* 450 */ = /* 451 */ 0);
/* 452 */ /* 453 */ /* 454 */ /* 455 */ let /* 456 */ mut /* 457 */ _z /* 458 */ = /* 459 */ (_x /* 460 */ = /* 461 */ 0) /* 462 */ < /* 463 */ (_x /* 464 */ = /* 465 */ 0);
/* 466 */ /* 467 */ /* 468 */ /* 469 */ let /* 470 */ _a /* 471 */ = /* 472 */ (_x /* 473 */ += /* 474 */ 0) /* 475 */ == /* 476 */ (_x /* 477 */ = /* 478 */ 0);
/* 479 */ /* 480 */ /* 481 */ /* 482 */ let /* 483 */ _b /* 484 */ = /* 485 */ swap(&mut /* 486 */ _y, /* 487 */ &mut /* 488 */ _z) /* 489 */ == /* 490 */ swap(&mut /* 491 */ _y, /* 492 */ &mut /* 493 */ _z);
}
fn /* 494 */ canttouchthis() /* 495 */ -> /* 496 */ usize /* 497 */ {
/* 498 */ /* 499 */ /* 500 */ /* 501 */ fn /* 502 */ p() /* 503 */ -> /* 504 */ bool /* 505 */ { /* 506 */ true /* 507 */ }
/* 508 */ /* 509 */ /* 510 */ /* 511 */ let /* 512 */ _a /* 513 */ = /* 514 */ (assert!(true) /* 515 */ == /* 516 */ (assert!(p())));
/* 517 */ /* 518 */ /* 519 */ /* 520 */ let /* 521 */ _c /* 522 */ = /* 523 */ (assert!(p()) /* 524 */ == /* 525 */ ());
/* 526 */ /* 527 */ /* 528 */ /* 529 */ let /* 530 */ _b: /* 531 */ bool /* 532 */ = /* 533 */ (println!("{}", /* 534 */ 0) /* 535 */ == /* 536 */ (return /* 537 */ 0));
}
fn /* 538 */ angrydome() /* 539 */ {
/* 540 */ /* 541 */ /* 542 */ /* 543 */ loop /* 544 */ { /* 545 */ if /* 546 */ break /* 547 */ { /* 548 */ } /* 549 */ }
/* 550 */ /* 551 */ /* 552 */ /* 553 */ let /* 554 */ mut /* 555 */ i /* 556 */ = /* 557 */ 0;
/* 558 */ /* 559 */ /* 560 */ /* 561 */ loop /* 562 */ { /* 563 */ i /* 564 */ += /* 565 */ 1; /* 566 */ if /* 567 */ i /* 568 */ == /* 569 */ 1 /* 570 */ { /* 571 */ match /* 572 */ (continue) /* 573 */ { /* 574 */ 1 /* 575 */ => /* 576 */ { /* 577 */ }, /* 578 */ _ /* 579 */ => /* 580 */ panic!("wat") /* 581 */ } /* 582 */ }
/* 583 */ /* 584 */ /* 585 */ /* 586 */ /* 587 */ /* 588 */ break; /* 589 */ }
}
fn /* 590 */ evil_lincoln() /* 591 */ { /* 592 */ let /* 593 */ _evil: /* 594 */ () /* 595 */ = /* 596 */ println!("lincoln"); /* 597 */ }
fn /* 598 */ dots() /* 599 */ {
/* 600 */ /* 601 */ /* 602 */ /* 603 */ assert_eq!(String::from(".................................................."),
/* 604 */ /* 605 */ /* 606 */ /* 607 */ /* 608 */ /* 609 */ /* 610 */ /* 611 */ /* 612 */ /* 613 */ /* 614 */ /* 615 */ /* 616 */ /* 617 */ /* 618 */ format!("{:?}", /* 619 */ .. /* 620 */ .. /* 621 */ .. /* 622 */ .. /* 623 */ .. /* 624 */ .. /* 625 */ .. /* 626 */ .. /* 627 */ .. /* 628 */ .. /* 629 */ .. /* 630 */ .. /* 631 */ ..
/* 632 */ /* 633 */ /* 634 */ /* 635 */ /* 636 */ /* 637 */ /* 638 */ /* 639 */ /* 640 */ /* 641 */ /* 642 */ /* 643 */ /* 644 */ /* 645 */ /* 646 */ /* 647 */ /* 648 */ /* 649 */ /* 650 */ /* 651 */ /* 652 */ /* 653 */ /* 654 */ /* 655 */ /* 656 */ /* 657 */ /* 658 */ /* 659 */ /* 660 */ /* 661 */ /* 662 */ .. /* 663 */ .. /* 664 */ .. /* 665 */ .. /* 666 */ .. /* 667 */ .. /* 668 */ .. /* 669 */ .. /* 670 */ .. /* 671 */ .. /* 672 */ .. /* 673 */ ..));
}
fn /* 674 */ u8(u8: /* 675 */ u8) /* 676 */ {
/* 677 */ /* 678 */ /* 679 */ /* 680 */ if /* 681 */ u8 /* 682 */ != /* 683 */ 0u8 /* 684 */ {
/* 685 */ /* 686 */ /* 687 */ /* 688 */ /* 689 */ /* 690 */ /* 691 */ /* 692 */ assert_eq!(8u8, /* 693 */ {
/* 694 */ /* 695 */ /* 696 */ /* 697 */ /* 698 */ /* 699 */ /* 700 */ /* 701 */ /* 702 */ /* 703 */ /* 704 */ /* 705 */ macro_rules! /* 706 */ u8 /* 707 */ {
/* 708 */ /* 709 */ /* 710 */ /* 711 */ /* 712 */ /* 713 */ /* 714 */ /* 715 */ /* 716 */ /* 717 */ /* 718 */ /* 719 */ /* 720 */ /* 721 */ /* 722 */ /* 723 */ (u8) /* 724 */ => /* 725 */ {
/* 726 */ /* 727 */ /* 728 */ /* 729 */ /* 730 */ /* 731 */ /* 732 */ /* 733 */ /* 734 */ /* 735 */ /* 736 */ /* 737 */ /* 738 */ /* 739 */ /* 740 */ /* 741 */ /* 742 */ /* 743 */ /* 744 */ /* 745 */ mod /* 746 */ u8 /* 747 */ {
/* 748 */ /* 749 */ /* 750 */ /* 751 */ /* 752 */ /* 753 */ /* 754 */ /* 755 */ /* 756 */ /* 757 */ /* 758 */ /* 759 */ /* 760 */ /* 761 */ /* 762 */ /* 763 */ /* 764 */ /* 765 */ /* 766 */ /* 767 */ /* 768 */ /* 769 */ /* 770 */ /* 771 */ pub /* 772 */ fn /* 773 */ u8<'u8: /* 774 */ 'u8 /* 775 */ + /* 776 */ 'u8>(u8: /* 777 */ &'u8 /* 778 */ u8) /* 779 */ -> /* 780 */ &'u8 /* 781 */ u8 /* 782 */ {
/* 783 */ /* 784 */ /* 785 */ /* 786 */ /* 787 */ /* 788 */ /* 789 */ /* 790 */ /* 791 */ /* 792 */ /* 793 */ /* 794 */ /* 795 */ /* 796 */ /* 797 */ /* 798 */ /* 799 */ /* 800 */ /* 801 */ /* 802 */ /* 803 */ /* 804 */ /* 805 */ /* 806 */ /* 807 */ /* 808 */ /* 809 */ /* 810 */ "u8";
/* 811 */ /* 812 */ /* 813 */ /* 814 */ /* 815 */ /* 816 */ /* 817 */ /* 818 */ /* 819 */ /* 820 */ /* 821 */ /* 822 */ /* 823 */ /* 824 */ /* 825 */ /* 826 */ /* 827 */ /* 828 */ /* 829 */ /* 830 */ /* 831 */ /* 832 */ /* 833 */ /* 834 */ /* 835 */ /* 836 */ /* 837 */ /* 838 */ u8
/* 839 */ /* 840 */ /* 841 */ /* 842 */ /* 843 */ /* 844 */ /* 845 */ /* 846 */ /* 847 */ /* 848 */ /* 849 */ /* 850 */ /* 851 */ /* 852 */ /* 853 */ /* 854 */ /* 855 */ /* 856 */ /* 857 */ /* 858 */ /* 859 */ /* 860 */ /* 861 */ /* 862 */ }
/* 863 */ /* 864 */ /* 865 */ /* 866 */ /* 867 */ /* 868 */ /* 869 */ /* 870 */ /* 871 */ /* 872 */ /* 873 */ /* 874 */ /* 875 */ /* 876 */ /* 877 */ /* 878 */ /* 879 */ /* 880 */ /* 881 */ /* 882 */ }
/* 883 */ /* 884 */ /* 885 */ /* 886 */ /* 887 */ /* 888 */ /* 889 */ /* 890 */ /* 891 */ /* 892 */ /* 893 */ /* 894 */ /* 895 */ /* 896 */ /* 897 */ /* 898 */ };
/* 899 */ /* 900 */ /* 901 */ /* 902 */ /* 903 */ /* 904 */ /* 905 */ /* 906 */ /* 907 */ /* 908 */ /* 909 */ /* 910 */ }
/* 911 */ /* 912 */ /* 913 */ /* 914 */ /* 915 */ /* 916 */ /* 917 */ /* 918 */ /* 919 */ /* 920 */ /* 921 */ /* 922 */ u8!(u8);
/* 923 */ /* 924 */ /* 925 */ /* 926 */ /* 927 */ /* 928 */ /* 929 */ /* 930 */ /* 931 */ /* 932 */ /* 933 */ /* 934 */ let /* 935 */ &u8: /* 936 */ &u8 /* 937 */ = /* 938 */ u8::u8(&8u8);
/* 939 */ /* 940 */ /* 941 */ /* 942 */ /* 943 */ /* 944 */ /* 945 */ /* 946 */ /* 947 */ /* 948 */ /* 949 */ /* 950 */ crate::u8(0u8);
/* 951 */ /* 952 */ /* 953 */ /* 954 */ /* 955 */ /* 956 */ /* 957 */ /* 958 */ /* 959 */ /* 960 */ /* 961 */ /* 962 */ u8
/* 963 */ /* 964 */ /* 965 */ /* 966 */ /* 967 */ /* 968 */ /* 969 */ /* 970 */ });
/* 971 */ /* 972 */ /* 973 */ /* 974 */ }
}
fn /* 975 */ fishy() /* 976 */ {
/* 977 */ /* 978 */ /* 979 */ /* 980 */ assert_eq!(String::from("><>"),
/* 981 */ /* 982 */ /* 983 */ /* 984 */ /* 985 */ /* 986 */ /* 987 */ /* 988 */ /* 989 */ /* 990 */ /* 991 */ /* 992 */ /* 993 */ /* 994 */ /* 995 */ String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>());
}
fn /* 996 */ union() /* 997 */ {
/* 998 */ /* 999 */ /* 1000 */ /* 1001 */ union /* 1002 */ union<'union> /* 1003 */ { /* 1004 */ union: /* 1005 */ &'union /* 1006 */ union<'union>, /* 1007 */ }
}
fn /* 1008 */ special_characters() /* 1009 */ {
/* 1010 */ /* 1011 */ /* 1012 */ /* 1013 */ let /* 1014 */ val /* 1015 */ = /* 1016 */ !((|(..):(_,_),(|__@_|__)|__)((&*"\\",'π€')/**/,{})=={&[..=..][..];})//
/* 1017 */ /* 1018 */ /* 1019 */ /* 1020 */ ;
/* 1021 */ /* 1022 */ /* 1023 */ /* 1024 */ assert!(!val);
}
fn /* 1025 */ punch_card() /* 1026 */ -> /* 1027 */ impl /* 1028 */ std::fmt::Debug /* 1029 */ {
/* 1030 */ /* 1031 */ /* 1032 */ /* 1033 */ ..=..=.. /* 1034 */ .. /* 1035 */ /* 1036 */ /* 1037 */ /* 1038 */ .. /* 1039 */ .. /* 1040 */ .. /* 1041 */ .. /* 1042 */ /* 1043 */ /* 1044 */ /* 1045 */ .. /* 1046 */ .. /* 1047 */ .. /* 1048 */ .. /* 1049 */ /* 1050 */ /* 1051 */ /* 1052 */ .. /* 1053 */ .. /* 1054 */ .. /* 1055 */ ..
/* 1056 */ /* 1057 */ /* 1058 */ /* 1059 */ ..=.. /* 1060 */ ..=.. /* 1061 */ /* 1062 */ /* 1063 */ /* 1064 */ .. /* 1065 */ .. /* 1066 */ .. /* 1067 */ .. /* 1068 */ /* 1069 */ /* 1070 */ /* 1071 */ .. /* 1072 */ .. /* 1073 */ .. /* 1074 */ .. /* 1075 */ /* 1076 */ /* 1077 */ /* 1078 */ .. /* 1079 */ ..=.. /* 1080 */ ..
/* 1081 */ /* 1082 */ /* 1083 */ /* 1084 */ ..=.. /* 1085 */ ..=.. /* 1086 */ /* 1087 */ /* 1088 */ /* 1089 */ ..=.. /* 1090 */ ..=.. /* 1091 */ /* 1092 */ /* 1093 */ /* 1094 */ .. /* 1095 */ ..=..=.. /* 1096 */ /* 1097 */ /* 1098 */ /* 1099 */ ..=..=..=..
/* 1100 */ /* 1101 */ /* 1102 */ /* 1103 */ ..=..=.. /* 1104 */ .. /* 1105 */ /* 1106 */ /* 1107 */ /* 1108 */ ..=.. /* 1109 */ ..=.. /* 1110 */ /* 1111 */ /* 1112 */ /* 1113 */ ..=.. /* 1114 */ .. /* 1115 */ .. /* 1116 */ /* 1117 */ /* 1118 */ /* 1119 */ .. /* 1120 */ ..=.. /* 1121 */ ..
/* 1122 */ /* 1123 */ /* 1124 */ /* 1125 */ ..=.. /* 1126 */ ..=.. /* 1127 */ /* 1128 */ /* 1129 */ /* 1130 */ ..=.. /* 1131 */ ..=.. /* 1132 */ /* 1133 */ /* 1134 */ /* 1135 */ .. /* 1136 */ ..=.. /* 1137 */ .. /* 1138 */ /* 1139 */ /* 1140 */ /* 1141 */ .. /* 1142 */ ..=.. /* 1143 */ ..
/* 1144 */ /* 1145 */ /* 1146 */ /* 1147 */ ..=.. /* 1148 */ ..=.. /* 1149 */ /* 1150 */ /* 1151 */ /* 1152 */ ..=.. /* 1153 */ ..=.. /* 1154 */ /* 1155 */ /* 1156 */ /* 1157 */ .. /* 1158 */ .. /* 1159 */ ..=.. /* 1160 */ /* 1161 */ /* 1162 */ /* 1163 */ .. /* 1164 */ ..=.. /* 1165 */ ..
/* 1166 */ /* 1167 */ /* 1168 */ /* 1169 */ ..=.. /* 1170 */ ..=.. /* 1171 */ /* 1172 */ /* 1173 */ /* 1174 */ .. /* 1175 */ ..=..=.. /* 1176 */ /* 1177 */ /* 1178 */ /* 1179 */ ..=..=.. /* 1180 */ .. /* 1181 */ /* 1182 */ /* 1183 */ /* 1184 */ .. /* 1185 */ ..=..=..
}
fn /* 1186 */ r#match() /* 1187 */ {
/* 1188 */ /* 1189 */ /* 1190 */ /* 1191 */ let /* 1192 */ val: /* 1193 */ () /* 1194 */ = /* 1195 */ match /* 1196 */ match /* 1197 */ match /* 1198 */ match /* 1199 */ match /* 1200 */ () /* 1201 */ {
/* 1202 */ /* 1203 */ /* 1204 */ /* 1205 */ /* 1206 */ /* 1207 */ /* 1208 */ /* 1209 */ () /* 1210 */ => /* 1211 */ ()
/* 1212 */ /* 1213 */ /* 1214 */ /* 1215 */ } /* 1216 */ {
/* 1217 */ /* 1218 */ /* 1219 */ /* 1220 */ /* 1221 */ /* 1222 */ /* 1223 */ /* 1224 */ () /* 1225 */ => /* 1226 */ ()
/* 1227 */ /* 1228 */ /* 1229 */ /* 1230 */ } /* 1231 */ {
/* 1232 */ /* 1233 */ /* 1234 */ /* 1235 */ /* 1236 */ /* 1237 */ /* 1238 */ /* 1239 */ () /* 1240 */ => /* 1241 */ ()
/* 1242 */ /* 1243 */ /* 1244 */ /* 1245 */ } /* 1246 */ {
/* 1247 */ /* 1248 */ /* 1249 */ /* 1250 */ /* 1251 */ /* 1252 */ /* 1253 */ /* 1254 */ () /* 1255 */ => /* 1256 */ ()
/* 1257 */ /* 1258 */ /* 1259 */ /* 1260 */ } /* 1261 */ {
/* 1262 */ /* 1263 */ /* 1264 */ /* 1265 */ /* 1266 */ /* 1267 */ /* 1268 */ /* 1269 */ () /* 1270 */ => /* 1271 */ ()
/* 1272 */ /* 1273 */ /* 1274 */ /* 1275 */ };
/* 1276 */ /* 1277 */ /* 1278 */ /* 1279 */ assert_eq!(val, /* 1280 */ ());
}
fn /* 1281 */ i_yield() /* 1282 */ {
/* 1283 */ /* 1284 */ /* 1285 */ /* 1286 */ #[coroutine]
/* 1287 */ /* 1288 */ /* 1289 */ /* 1290 */ static /* 1291 */ || /* 1292 */ {
/* 1293 */ /* 1294 */ /* 1295 */ /* 1296 */ /* 1297 */ /* 1298 */ /* 1299 */ /* 1300 */ yield /* 1301 */ yield /* 1302 */ yield /* 1303 */ yield /* 1304 */ yield /* 1305 */ yield /* 1306 */ yield /* 1307 */ yield /* 1308 */ yield;
/* 1309 */ /* 1310 */ /* 1311 */ /* 1312 */ };
}
fn /* 1313 */ match_nested_if() /* 1314 */ {
/* 1315 */ /* 1316 */ /* 1317 */ /* 1318 */ let /* 1319 */ val /* 1320 */ = /* 1321 */ match /* 1322 */ () /* 1323 */ {
/* 1324 */ /* 1325 */ /* 1326 */ /* 1327 */ /* 1328 */ /* 1329 */ /* 1330 */ /* 1331 */ () /* 1332 */ if /* 1333 */ if /* 1334 */ if /* 1335 */ if /* 1336 */ true /* 1337 */ {true} /* 1338 */ else /* 1339 */ {false} /* 1340 */ {true} /* 1341 */ else /* 1342 */ {false} /* 1343 */ {true} /* 1344 */ else /* 1345 */ {false} /* 1346 */ => /* 1347 */ true,
/* 1348 */ /* 1349 */ /* 1350 */ /* 1351 */ /* 1352 */ /* 1353 */ /* 1354 */ /* 1355 */ _ /* 1356 */ => /* 1357 */ false,
/* 1358 */ /* 1359 */ /* 1360 */ /* 1361 */ };
/* 1362 */ /* 1363 */ /* 1364 */ /* 1365 */ assert!(val);
}
fn /* 1366 */ monkey_barrel() /* 1367 */ {
/* 1368 */ /* 1369 */ /* 1370 */ /* 1371 */ let /* 1372 */ val: /* 1373 */ () /* 1374 */ = /* 1375 */ ()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=()=();
/* 1376 */ /* 1377 */ /* 1378 */ /* 1379 */ assert_eq!(val, /* 1380 */ ());
}
fn /* 1381 */ ππππππππ() /* 1382 */ {
/* 1383 */ /* 1384 */ /* 1385 */ /* 1386 */ type /* 1387 */ ππππ /* 1388 */ = /* 1389 */ i32;
/* 1390 */ /* 1391 */ /* 1392 */ /* 1393 */ fn /* 1394 */ πππππ() /* 1395 */ -> /* 1396 */ ππππ /* 1397 */ {
/* 1398 */ /* 1399 */ /* 1400 */ /* 1401 */ /* 1402 */ /* 1403 */ /* 1404 */ /* 1405 */ let /* 1406 */ ππππππ /* 1407 */ = /* 1408 */ 42;
/* 1409 */ /* 1410 */ /* 1411 */ /* 1412 */ /* 1413 */ /* 1414 */ /* 1415 */ /* 1416 */ return /* 1417 */ ππππππ;
/* 1418 */ /* 1419 */ /* 1420 */ /* 1421 */ }
/* 1422 */ /* 1423 */ /* 1424 */ /* 1425 */ assert_eq!(loop /* 1426 */ {
/* 1427 */ /* 1428 */ /* 1429 */ /* 1430 */ /* 1431 */ /* 1432 */ /* 1433 */ /* 1434 */ break /* 1435 */ πππππ /* 1436 */ ();
/* 1437 */ /* 1438 */ /* 1439 */ /* 1440 */ }, /* 1441 */ 42);
}
fn /* 1442 */ function() /* 1443 */ {
/* 1444 */ /* 1445 */ /* 1446 */ /* 1447 */ struct /* 1448 */ foo;
/* 1449 */ /* 1450 */ /* 1451 */ /* 1452 */ impl /* 1453 */ Deref /* 1454 */ for /* 1455 */ foo /* 1456 */ {
/* 1457 */ /* 1458 */ /* 1459 */ /* 1460 */ /* 1461 */ /* 1462 */ /* 1463 */ /* 1464 */ type /* 1465 */ Target /* 1466 */ = /* 1467 */ fn() /* 1468 */ -> /* 1469 */ Self;
/* 1470 */ /* 1471 */ /* 1472 */ /* 1473 */ /* 1474 */ /* 1475 */ /* 1476 */ /* 1477 */ fn /* 1478 */ deref(&self) /* 1479 */ -> /* 1480 */ &Self::Target /* 1481 */ {
/* 1482 */ /* 1483 */ /* 1484 */ /* 1485 */ /* 1486 */ /* 1487 */ /* 1488 */ /* 1489 */ /* 1490 */ /* 1491 */ /* 1492 */ /* 1493 */ &((|| /* 1494 */ foo) /* 1495 */ as /* 1496 */ _)
/* 1497 */ /* 1498 */ /* 1499 */ /* 1500 */ /* 1501 */ /* 1502 */ /* 1503 */ /* 1504 */ }
/* 1505 */ /* 1506 */ /* 1507 */ /* 1508 */ }
/* 1509 */ /* 1510 */ /* 1511 */ /* 1512 */ let /* 1513 */ foo /* 1514 */ = /* 1515 */ foo /* 1516 */ () /* 1517 */ ()() /* 1518 */ ()()() /* 1519 */ ()()()() /* 1520 */ ()()()()();
}
fn /* 1521 */ bathroom_stall() /* 1522 */ {
/* 1523 */ /* 1524 */ /* 1525 */ /* 1526 */ let /* 1527 */ mut /* 1528 */ i /* 1529 */ = /* 1530 */ 1;
/* 1531 */ /* 1532 */ /* 1533 */ /* 1534 */ matches!(2, /* 1535 */ _|_|_|_|_|_ /* 1536 */ if /* 1537 */ (i+=1) /* 1538 */ != /* 1539 */ (i+=1));
/* 1540 */ /* 1541 */ /* 1542 */ /* 1543 */ assert_eq!(i, /* 1544 */ 13);
}
fn /* 1545 */ closure_matching() /* 1546 */ {
/* 1547 */ /* 1548 */ /* 1549 */ /* 1550 */ let /* 1551 */ x /* 1552 */ = /* 1553 */ |_| /* 1554 */ Some(1);
/* 1555 */ /* 1556 */ /* 1557 */ /* 1558 */ let /* 1559 */ (|x| /* 1560 */ x) /* 1561 */ = /* 1562 */ match /* 1563 */ x(..) /* 1564 */ {
/* 1565 */ /* 1566 */ /* 1567 */ /* 1568 */ /* 1569 */ /* 1570 */ /* 1571 */ /* 1572 */ |_| /* 1573 */ Some(2) /* 1574 */ => /* 1575 */ |_| /* 1576 */ Some(3),
/* 1577 */ /* 1578 */ /* 1579 */ /* 1580 */ /* 1581 */ /* 1582 */ /* 1583 */ /* 1584 */ |_| /* 1585 */ _ /* 1586 */ => /* 1587 */ unreachable!(),
/* 1588 */ /* 1589 */ /* 1590 */ /* 1591 */ };
/* 1592 */ /* 1593 */ /* 1594 */ /* 1595 */ assert!(matches!(x(..), /* 1596 */ |_| /* 1597 */ Some(4)));
}
fn /* 1598 */ semisemisemisemisemi() /* 1599 */ {
/* 1600 */ /* 1601 */ /* 1602 */ /* 1603 */ ;;;;;;; /* 1604 */ ;;;;;;; /* 1605 */ ;;; /* 1606 */ /* 1607 */ /* 1608 */ /* 1609 */ ;;; /* 1610 */ ;;
/* 1611 */ /* 1612 */ /* 1613 */ /* 1614 */ ;; /* 1615 */ /* 1616 */ /* 1617 */ /* 1618 */ /* 1619 */ /* 1620 */ ;; /* 1621 */ /* 1622 */ /* 1623 */ /* 1624 */ /* 1625 */ /* 1626 */ ;;;; /* 1627 */ /* 1628 */ ;;;; /* 1629 */ ;;
/* 1630 */ /* 1631 */ /* 1632 */ /* 1633 */ ;;;;;;; /* 1634 */ ;;;;; /* 1635 */ /* 1636 */ /* 1637 */ ;; /* 1638 */ ;;;; /* 1639 */ ;; /* 1640 */ ;;
/* 1641 */ /* 1642 */ /* 1643 */ /* 1644 */ /* 1645 */ /* 1646 */ /* 1647 */ /* 1648 */ /* 1649 */ ;; /* 1650 */ ;; /* 1651 */ /* 1652 */ /* 1653 */ /* 1654 */ /* 1655 */ /* 1656 */ ;; /* 1657 */ /* 1658 */ ;; /* 1659 */ /* 1660 */ ;; /* 1661 */ ;;
/* 1662 */ /* 1663 */ /* 1664 */ /* 1665 */ ;;;;;;; /* 1666 */ ;;;;;;; /* 1667 */ ;; /* 1668 */ /* 1669 */ /* 1670 */ /* 1671 */ /* 1672 */ /* 1673 */ ;; /* 1674 */ ;;
}
fn /* 1675 */ useful_syntax() /* 1676 */ {
/* 1677 */ /* 1678 */ /* 1679 */ /* 1680 */ use /* 1681 */ {{std::{{collections::{{HashMap}}}}}};
/* 1682 */ /* 1683 */ /* 1684 */ /* 1685 */ use /* 1686 */ ::{{{{core}, /* 1687 */ {std}}}};
/* 1688 */ /* 1689 */ /* 1690 */ /* 1691 */ use /* 1692 */ {{::{{core /* 1693 */ as /* 1694 */ core2}}}};
}
fn /* 1695 */ infcx() /* 1696 */ {
/* 1697 */ /* 1698 */ /* 1699 */ /* 1700 */ pub /* 1701 */ mod /* 1702 */ cx /* 1703 */ {
/* 1704 */ /* 1705 */ /* 1706 */ /* 1707 */ /* 1708 */ /* 1709 */ /* 1710 */ /* 1711 */ pub /* 1712 */ mod /* 1713 */ cx /* 1714 */ {
/* 1715 */ /* 1716 */ /* 1717 */ /* 1718 */ /* 1719 */ /* 1720 */ /* 1721 */ /* 1722 */ /* 1723 */ /* 1724 */ /* 1725 */ /* 1726 */ pub /* 1727 */ use /* 1728 */ super::cx;
/* 1729 */ /* 1730 */ /* 1731 */ /* 1732 */ /* 1733 */ /* 1734 */ /* 1735 */ /* 1736 */ /* 1737 */ /* 1738 */ /* 1739 */ /* 1740 */ pub /* 1741 */ struct /* 1742 */ Cx;
/* 1743 */ /* 1744 */ /* 1745 */ /* 1746 */ /* 1747 */ /* 1748 */ /* 1749 */ /* 1750 */ }
/* 1751 */ /* 1752 */ /* 1753 */ /* 1754 */ }
/* 1755 */ /* 1756 */ /* 1757 */ /* 1758 */ let /* 1759 */ _cx: /* 1760 */ cx::cx::Cx /* 1761 */ = /* 1762 */ cx::cx::cx::cx::cx::Cx;
}
fn /* 1763 */ return_already() /* 1764 */ -> /* 1765 */ impl /* 1766 */ std::fmt::Debug /* 1767 */ {
/* 1768 */ /* 1769 */ /* 1770 */ /* 1771 */ loop /* 1772 */ {
/* 1773 */ /* 1774 */ /* 1775 */ /* 1776 */ /* 1777 */ /* 1778 */ /* 1779 */ /* 1780 */ return /* 1781 */ !!!!!!!
/* 1782 */ /* 1783 */ /* 1784 */ /* 1785 */ /* 1786 */ /* 1787 */ /* 1788 */ /* 1789 */ break /* 1790 */ !!!!!!1111
/* 1791 */ /* 1792 */ /* 1793 */ /* 1794 */ }
}
fn /* 1795 */ fake_macros() /* 1796 */ -> /* 1797 */ impl /* 1798 */ std::fmt::Debug /* 1799 */ {
/* 1800 */ /* 1801 */ /* 1802 */ /* 1803 */ loop /* 1804 */ {
/* 1805 */ /* 1806 */ /* 1807 */ /* 1808 */ /* 1809 */ /* 1810 */ /* 1811 */ /* 1812 */ if! /* 1813 */ {
/* 1814 */ /* 1815 */ /* 1816 */ /* 1817 */ /* 1818 */ /* 1819 */ /* 1820 */ /* 1821 */ /* 1822 */ /* 1823 */ /* 1824 */ /* 1825 */ match! /* 1826 */ (
/* 1827 */ /* 1828 */ /* 1829 */ /* 1830 */ /* 1831 */ /* 1832 */ /* 1833 */ /* 1834 */ /* 1835 */ /* 1836 */ /* 1837 */ /* 1838 */ /* 1839 */ /* 1840 */ /* 1841 */ /* 1842 */ break! /* 1843 */ {
/* 1844 */ /* 1845 */ /* 1846 */ /* 1847 */ /* 1848 */ /* 1849 */ /* 1850 */ /* 1851 */ /* 1852 */ /* 1853 */ /* 1854 */ /* 1855 */ /* 1856 */ /* 1857 */ /* 1858 */ /* 1859 */ /* 1860 */ /* 1861 */ /* 1862 */ /* 1863 */ return! /* 1864 */ {
/* 1865 */ /* 1866 */ /* 1867 */ /* 1868 */ /* 1869 */ /* 1870 */ /* 1871 */ /* 1872 */ /* 1873 */ /* 1874 */ /* 1875 */ /* 1876 */ /* 1877 */ /* 1878 */ /* 1879 */ /* 1880 */ /* 1881 */ /* 1882 */ /* 1883 */ /* 1884 */ /* 1885 */ /* 1886 */ /* 1887 */ /* 1888 */ 1337
/* 1889 */ /* 1890 */ /* 1891 */ /* 1892 */ /* 1893 */ /* 1894 */ /* 1895 */ /* 1896 */ /* 1897 */ /* 1898 */ /* 1899 */ /* 1900 */ /* 1901 */ /* 1902 */ /* 1903 */ /* 1904 */ /* 1905 */ /* 1906 */ /* 1907 */ /* 1908 */ }
/* 1909 */ /* 1910 */ /* 1911 */ /* 1912 */ /* 1913 */ /* 1914 */ /* 1915 */ /* 1916 */ /* 1917 */ /* 1918 */ /* 1919 */ /* 1920 */ /* 1921 */ /* 1922 */ /* 1923 */ /* 1924 */ }
/* 1925 */ /* 1926 */ /* 1927 */ /* 1928 */ /* 1929 */ /* 1930 */ /* 1931 */ /* 1932 */ /* 1933 */ /* 1934 */ /* 1935 */ /* 1936 */ )
/* 1937 */ /* 1938 */ /* 1939 */ /* 1940 */ /* 1941 */ /* 1942 */ /* 1943 */ /* 1944 */ /* 1945 */ /* 1946 */ /* 1947 */ /* 1948 */ {}
/* 1949 */ /* 1950 */ /* 1951 */ /* 1952 */ /* 1953 */ /* 1954 */ /* 1955 */ /* 1956 */ }
/* 1957 */ /* 1958 */ /* 1959 */ /* 1960 */ /* 1961 */ /* 1962 */ /* 1963 */ /* 1964 */ {}
/* 1965 */ /* 1966 */ /* 1967 */ /* 1968 */ }
}
fn /* 1969 */ fish_fight() /* 1970 */ {
/* 1971 */ /* 1972 */ /* 1973 */ /* 1974 */ trait /* 1975 */ Rope /* 1976 */ {
/* 1977 */ /* 1978 */ /* 1979 */ /* 1980 */ /* 1981 */ /* 1982 */ /* 1983 */ /* 1984 */ fn /* 1985 */ _____________<U>(_: /* 1986 */ Self, /* 1987 */ _: /* 1988 */ U) /* 1989 */ where /* 1990 */ Self: /* 1991 */ Sized /* 1992 */ {}
/* 1993 */ /* 1994 */ /* 1995 */ /* 1996 */ }
/* 1997 */ /* 1998 */ /* 1999 */ /* 2000 */ struct /* 2001 */ T;
/* 2002 */ /* 2003 */ /* 2004 */ /* 2005 */ impl /* 2006 */ Rope /* 2007 */ for /* 2008 */ T /* 2009 */ {}
/* 2010 */ /* 2011 */ /* 2012 */ /* 2013 */ fn /* 2014 */ tug_o_war(_: /* 2015 */ impl /* 2016 */ Fn(T, /* 2017 */ T)) /* 2018 */ {}
/* 2019 */ /* 2020 */ /* 2021 */ /* 2022 */ tug_o_war(<T>::_____________::<T>);
}
pub /* 2023 */ fn /* 2024 */ main() /* 2025 */ {
/* 2026 */ /* 2027 */ /* 2028 */ /* 2029 */ strange();
/* 2030 */ /* 2031 */ /* 2032 */ /* 2033 */ funny();
/* 2034 */ /* 2035 */ /* 2036 */ /* 2037 */ what();
/* 2038 */ /* 2039 */ /* 2040 */ /* 2041 */ zombiejesus();
/* 2042 */ /* 2043 */ /* 2044 */ /* 2045 */ notsure();
/* 2046 */ /* 2047 */ /* 2048 */ /* 2049 */ canttouchthis();
/* 2050 */ /* 2051 */ /* 2052 */ /* 2053 */ angrydome();
/* 2054 */ /* 2055 */ /* 2056 */ /* 2057 */ evil_lincoln();
/* 2058 */ /* 2059 */ /* 2060 */ /* 2061 */ dots();
/* 2062 */ /* 2063 */ /* 2064 */ /* 2065 */ u8(8u8);
/* 2066 */ /* 2067 */ /* 2068 */ /* 2069 */ fishy();
/* 2070 */ /* 2071 */ /* 2072 */ /* 2073 */ union();
/* 2074 */ /* 2075 */ /* 2076 */ /* 2077 */ special_characters();
/* 2078 */ /* 2079 */ /* 2080 */ /* 2081 */ punch_card();
/* 2082 */ /* 2083 */ /* 2084 */ /* 2085 */ r#match();
/* 2086 */ /* 2087 */ /* 2088 */ /* 2089 */ i_yield();
/* 2090 */ /* 2091 */ /* 2092 */ /* 2093 */ match_nested_if();
/* 2094 */ /* 2095 */ /* 2096 */ /* 2097 */ monkey_barrel();
/* 2098 */ /* 2099 */ /* 2100 */ /* 2101 */ ππππππππ();
/* 2102 */ /* 2103 */ /* 2104 */ /* 2105 */ function();
/* 2106 */ /* 2107 */ /* 2108 */ /* 2109 */ bathroom_stall();
/* 2110 */ /* 2111 */ /* 2112 */ /* 2113 */ closure_matching();
/* 2114 */ /* 2115 */ /* 2116 */ /* 2117 */ semisemisemisemisemi();
/* 2118 */ /* 2119 */ /* 2120 */ /* 2121 */ useful_syntax();
/* 2122 */ /* 2123 */ /* 2124 */ /* 2125 */ infcx();
/* 2126 */ /* 2127 */ /* 2128 */ /* 2129 */ return_already();
/* 2130 */ /* 2131 */ /* 2132 */ /* 2133 */ fake_macros();
/* 2134 */ /* 2135 */ /* 2136 */ /* 2137 */ fish_fight();
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/ui/expr/weird-exprs.rs and the injected-comment reproduction described in the issue. Run rustfmt on the modified input and compare the output to identify which comments are lost, then trace the relevant formatter behavior. Done means the comments remain present after formatting, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100