Spaces:
Sleeping
Sleeping
File size: 34,526 Bytes
005e9fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 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 193 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 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 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 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 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 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 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 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 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 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 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 772 773 774 775 776 777 778 779 780 781 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 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 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 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 | [
{
"question": "Why must I implement Display before using trait methods?",
"chunk_id": "book/ch20-02-advanced-traits.md#using-supertraits-16",
"book": "book"
},
{
"question": "How to return Result from a Rust constructor?",
"chunk_id": "book/ch12-03-improving-error-handling-and-modularity.md#returning-a-result-instead-of-calling-panic-10",
"book": "book"
},
{
"question": "How do I force an asm! operand into eax?",
"chunk_id": "rust-by-example/unsafe/asm.md#explicit-register-operands-6",
"book": "rust-by-example"
},
{
"question": "What syntax does #[link_name] use?",
"chunk_id": "reference/items/external-blocks.md#the-link_name-attribute-13",
"book": "reference"
},
{
"question": "What does Pin<Box<T>> mean in Rust?",
"chunk_id": "async-book/part-reference/pinning.md#pinning-1-5",
"book": "async-book"
},
{
"question": "is HashMap iteration order deterministic rust",
"chunk_id": "book/ch08-03-hash-maps.md#accessing-values-in-a-hash-map-2",
"book": "book"
},
{
"question": "Do HashMap insertions move or copy values?",
"chunk_id": "book/ch08-03-hash-maps.md#managing-ownership-in-hash-maps-3",
"book": "book"
},
{
"question": "What escape sequences does Rust support?",
"chunk_id": "reference/tokens.md#suffixes-3",
"book": "reference"
},
{
"question": "where should I write tests when splitting into lib.rs",
"chunk_id": "book/ch12-03-improving-error-handling-and-modularity.md#splitting-code-into-a-library-crate-20",
"book": "book"
},
{
"question": "How do I fix compile error using ? in main",
"chunk_id": "book/ch09-02-recoverable-errors-with-result.md#where-to-use-the--operator-13",
"book": "book"
},
{
"question": "Where do Rust collections store their data?",
"chunk_id": "book/ch08-00-common-collections.md#common-collections-0",
"book": "book"
},
{
"question": "Construct a struct using variables that share field names",
"chunk_id": "book/ch05-01-defining-structs.md#using-the-field-init-shorthand-3",
"book": "book"
},
{
"question": "What does .lines() return in Rust?",
"chunk_id": "rust-by-example/std_misc/file/read_lines.md#a-naive-approach-0",
"book": "rust-by-example"
},
{
"question": "How can I emit a NOP instruction from Rust?",
"chunk_id": "rust-by-example/unsafe/asm.md#basic-usage-1",
"book": "rust-by-example"
},
{
"question": "How do I override one lint in a group?",
"chunk_id": "reference/attributes/diagnostics.md#lint-groups-7",
"book": "reference"
},
{
"question": "Why does calling Trait::method() produce an ambiguous implementation error?",
"chunk_id": "book/ch20-02-advanced-traits.md#disambiguating-between-identically-named-methods-10",
"book": "book"
},
{
"question": "How do I write a char literal in Rust?",
"chunk_id": "book/ch03-02-data-types.md#the-character-type-7",
"book": "book"
},
{
"question": "How to use cargo --offline after downloading crates?",
"chunk_id": "book/ch01-01-installation.md#working-offline-with-this-book-8",
"book": "book"
},
{
"question": "How do tuple structs differ from tuples?",
"chunk_id": "book/ch05-01-defining-structs.md#creating-different-types-with-tuple-structs-6",
"book": "book"
},
{
"question": "Can I add attributes to elements of arrays or tuples?",
"chunk_id": "reference/expressions.md#expression-attributes-13",
"book": "reference"
},
{
"question": "Can I pass a function pointer to inline asm?",
"chunk_id": "reference/inline-assembly.md#register-operands-15",
"book": "reference"
},
{
"question": "How do I write raw C string literals with # delimiters?",
"chunk_id": "reference/expressions/literal-expr.md#c-string-literal-expressions-13",
"book": "reference"
},
{
"question": "How do I change a PathBuf's filename in Rust?",
"chunk_id": "rust-by-example/std_misc/path.md#path-1",
"book": "rust-by-example"
},
{
"question": "How do I handle grapheme clusters in Rust strings?",
"chunk_id": "book/ch08-02-strings.md#iterating-over-strings-14",
"book": "book"
},
{
"question": "What panic strategies does Rust support?",
"chunk_id": "reference/panic.md#standard-behavior-2",
"book": "reference"
},
{
"question": "How do I build a runnable Rust binary?",
"chunk_id": "reference/linkage.md#linkage-0",
"book": "reference"
},
{
"question": "Why must Deref::deref return a reference instead of moving value?",
"chunk_id": "book/ch15-02-deref.md#implementing-the-deref-trait-7",
"book": "book"
},
{
"question": "What does cargo publish do?",
"chunk_id": "book/ch14-02-publishing-to-crates-io.md#publishing-to-cratesio-13",
"book": "book"
},
{
"question": "Why are mutable references problematic with the Iterator trait?",
"chunk_id": "nomicon/borrow-splitting.md#splitting-borrows-1",
"book": "nomicon"
},
{
"question": "Do function parameters live for the whole function body?",
"chunk_id": "reference/destructors.md#scopes-of-function-parameters-3",
"book": "reference"
},
{
"question": "What does #[repr(transparent)] guarantee about layout and ABI?",
"chunk_id": "nomicon/other-reprs.md#reprtransparent-3",
"book": "nomicon"
},
{
"question": "How to call a trait method on a generic type parameter?",
"chunk_id": "book/ch15-05-interior-mutability.md#testing-with-mock-objects-5",
"book": "book"
},
{
"question": "What does LLVM mean by \"allocation\"?",
"chunk_id": "nomicon/vec/vec-alloc.md#allocating-memory-4",
"book": "nomicon"
},
{
"question": "Why should I clone an Rc to share ownership?",
"chunk_id": "book/ch15-05-interior-mutability.md#allowing-multiple-owners-of-mutable-data-15",
"book": "book"
},
{
"question": "Does aborting a JoinHandle notify the future?",
"chunk_id": "async-book/part-guide/more-async-await.md#cancellation-4",
"book": "async-book"
},
{
"question": "How can I ignore an iterator result to silence the warning?",
"chunk_id": "book/ch13-02-iterators.md#methods-that-produce-other-iterators-5",
"book": "book"
},
{
"question": "How do I create a String from a literal?",
"chunk_id": "book/ch04-01-what-is-ownership.md#the-string-type-7",
"book": "book"
},
{
"question": "Why shouldn't I use Rc for parent pointers?",
"chunk_id": "book/ch15-06-reference-cycles.md#adding-a-reference-from-a-child-to-its-parent-8",
"book": "book"
},
{
"question": "How does Rust find space for heap allocations?",
"chunk_id": "book/ch04-01-what-is-ownership.md#the-stack-and-the-heap-2",
"book": "book"
},
{
"question": "Does ? inside async block propagate to outer function?",
"chunk_id": "async-book/part-guide/more-async-await.md#async-blocks-7",
"book": "async-book"
},
{
"question": "How are modules organized inside a crate?",
"chunk_id": "reference/glossary.md#crate-9",
"book": "reference"
},
{
"question": "How do I pattern-match struct fields in a match expression?",
"chunk_id": "reference/patterns.md#struct-patterns-20",
"book": "reference"
},
{
"question": "How do I require a generic type to implement a trait?",
"chunk_id": "book/ch10-02-traits.md#defining-shared-behavior-with-traits-0",
"book": "book"
},
{
"question": "How does implementing Drop affect lifetimes and borrowing?",
"chunk_id": "nomicon/dropck.md#drop-check-1",
"book": "nomicon"
},
{
"question": "Are NonNull and NonZero allowed to hold out-of-range values?",
"chunk_id": "reference/behavior-considered-undefined.md#invalid-values-8",
"book": "reference"
},
{
"question": "How can I make two async tasks interleave on the executor?",
"chunk_id": "book/ch17-03-more-futures.md#yielding-control-to-the-runtime-3",
"book": "book"
},
{
"question": "What does -> impl Trait mean in Rust?",
"chunk_id": "book/ch10-02-traits.md#returning-types-that-implement-traits-12",
"book": "book"
},
{
"question": "How to store ints, floats, and strings in one Vec?",
"chunk_id": "book/ch08-01-vectors.md#using-an-enum-to-store-multiple-types-8",
"book": "book"
},
{
"question": "How do references work in Rust?",
"chunk_id": "nomicon/references.md#references-0",
"book": "nomicon"
},
{
"question": "How do I assign a block's result to a variable?",
"chunk_id": "book/ch03-03-how-functions-work.md#statements-and-expressions-6",
"book": "book"
},
{
"question": "Can traits requiring Self: Sized be made into trait objects?",
"chunk_id": "reference/items/traits.md#dyn-compatibility-3",
"book": "reference"
},
{
"question": "How are writes to union fields captured by closures?",
"chunk_id": "reference/types/closure.md#union-fields-17",
"book": "reference"
},
{
"question": "How do I add attributes to a Rust module?",
"chunk_id": "reference/items/modules.md#attributes-on-modules-4",
"book": "reference"
},
{
"question": "Can Rc and RefCell cause memory leaks?",
"chunk_id": "book/ch15-06-reference-cycles.md#creating-a-reference-cycle-1",
"book": "book"
},
{
"question": "Why does an empty vector require a type annotation?",
"chunk_id": "book/ch08-01-vectors.md#creating-a-new-vector-1",
"book": "book"
},
{
"question": "Why can I leave out lifetimes in function signatures?",
"chunk_id": "rust-by-example/scope/lifetime/elision.md#elision-0",
"book": "rust-by-example"
},
{
"question": "Which crates are required for writing a custom derive macro?",
"chunk_id": "book/ch20-05-macros.md#custom-derive-macros-9",
"book": "book"
},
{
"question": "How can I pad and align values with println! format specifiers?",
"chunk_id": "rust-by-example/hello/print.md#formatted-print-1",
"book": "rust-by-example"
},
{
"question": "How to handle file I/O errors in Rust?",
"chunk_id": "rust-by-example/std_misc/file/create.md#create-0",
"book": "rust-by-example"
},
{
"question": "When does conditional assignment still leave a variable uninitialized?",
"chunk_id": "nomicon/checked-uninit.md#checked-uninitialized-memory-0",
"book": "nomicon"
},
{
"question": "Why can't I compare a String with an integer in Rust?",
"chunk_id": "book/ch02-00-guessing-game-tutorial.md#comparing-the-guess-to-the-secret-number-25",
"book": "book"
},
{
"question": "What belongs in main versus lib.rs in Rust binaries",
"chunk_id": "book/ch12-03-improving-error-handling-and-modularity.md#extracting-the-argument-parser-2",
"book": "book"
},
{
"question": "What tokens can appear after a $(...)* repetition in macro_rules?",
"chunk_id": "reference/macro-ambiguity.md#examples-of-first-and-last-11",
"book": "reference"
},
{
"question": "Why use Box<T> for recursive types?",
"chunk_id": "book/ch15-01-box.md#understanding-the-cons-list-2",
"book": "book"
},
{
"question": "How do I iterate over a slice of zero-sized types?",
"chunk_id": "nomicon/vec/vec-zsts.md#iterating-zero-sized-types-5",
"book": "nomicon"
},
{
"question": "Does creating a future start concurrent execution?",
"chunk_id": "book/ch17-02-concurrency-with-async.md#sending-data-between-two-tasks-using-message-passing-7",
"book": "book"
},
{
"question": "Why does Rust have unsafe traits?",
"chunk_id": "nomicon/safe-unsafe-meaning.md#how-safe-and-unsafe-interact-3",
"book": "nomicon"
},
{
"question": "Does Rust drop the previous value before assignment?",
"chunk_id": "reference/expressions/operator-expr.md#basic-assignments-30",
"book": "reference"
},
{
"question": "How to write a value into a raw pointer safely?",
"chunk_id": "nomicon/vec/vec-insert-remove.md#insert-and-remove-0",
"book": "nomicon"
},
{
"question": "Can C++ exceptions unwind through Rust code and drop Rust values?",
"chunk_id": "nomicon/ffi.md#c-throw-with-c-unwind-26",
"book": "nomicon"
},
{
"question": "How to bind an Option value inside a match arm?",
"chunk_id": "reference/expressions/match-expr.md#match-guards-4",
"book": "reference"
},
{
"question": "How to avoid borrow checker issues when conditionally inserting into HashMap?",
"chunk_id": "book/ch08-03-hash-maps.md#updating-a-value-based-on-the-old-value-5",
"book": "book"
},
{
"question": "Why am I getting unfulfilled_lint_expectations for #[expect]?",
"chunk_id": "reference/attributes/diagnostics.md#the-expect-attribute-4",
"book": "reference"
},
{
"question": "How do I share setup code between Rust integration tests?",
"chunk_id": "book/ch11-03-test-organization.md#integration-tests-for-binary-crates-9",
"book": "book"
},
{
"question": "How to check panic strategy at compile time in Rust?",
"chunk_id": "rust-by-example/error/abort_unwind.md#abort-and-unwind-0",
"book": "rust-by-example"
},
{
"question": "How do I enable backtraces for failing Rust tests?",
"chunk_id": "book/ch11-01-writing-tests.md#testing-equality-with-assert_eq-and-assert_ne-15",
"book": "book"
},
{
"question": "Does asm! readonly treat readable memory as an input?",
"chunk_id": "reference/inline-assembly.md#rules-for-inline-assembly-40",
"book": "reference"
},
{
"question": "How do I rename variables when matching a struct?",
"chunk_id": "rust-by-example/flow_control/match/destructuring/destructure_structures.md#structs-0",
"book": "rust-by-example"
},
{
"question": "How many bits is usize on my platform?",
"chunk_id": "reference/types/numeric.md#machine-dependent-integer-types-2",
"book": "reference"
},
{
"question": "Do Rust closures borrow whole variables or only used fields?",
"chunk_id": "reference/types/closure.md#capture-precision-4",
"book": "reference"
},
{
"question": "Why is use crate; illegal in Rust?",
"chunk_id": "reference/items/use-declarations.md#restrictions-12",
"book": "reference"
},
{
"question": "How to have multiple producers on a Rust channel?",
"chunk_id": "book/ch16-02-message-passing.md#creating-multiple-producers-8",
"book": "book"
},
{
"question": "How do I send a PR to the Rust Reference repo?",
"chunk_id": "reference/introduction.md#contributing-6",
"book": "reference"
},
{
"question": "Do temporaries live until end of statement or end of expression?",
"chunk_id": "reference/destructors.md#drop-scopes-2",
"book": "reference"
},
{
"question": "How to send closures through a channel to worker threads",
"chunk_id": "book/ch21-02-multithreaded.md#implementing-the-execute-method-21",
"book": "book"
},
{
"question": "Does &'a dyn Trait imply dyn Trait + 'a?",
"chunk_id": "reference/lifetime-elision.md#default-trait-object-lifetimes-5",
"book": "reference"
},
{
"question": "How to use an associated type to name a concrete type?",
"chunk_id": "reference/items/associated-items.md#associated-types-5",
"book": "reference"
},
{
"question": "Which registers are caller-saved for x86-64 System V?",
"chunk_id": "reference/inline-assembly.md#abi-clobbers-31",
"book": "reference"
},
{
"question": "Do iterator adapter methods like sum consume the iterator?",
"chunk_id": "book/ch13-02-iterators.md#methods-that-consume-the-iterator-4",
"book": "book"
},
{
"question": "Does creating a slice from an arbitrary address cause UB?",
"chunk_id": "book/ch20-01-unsafe-rust.md#using-extern-functions-to-call-external-code-11",
"book": "book"
},
{
"question": "why does &String coerce to &str",
"chunk_id": "book/ch15-02-deref.md#using-deref-coercion-in-functions-and-methods-8",
"book": "book"
},
{
"question": "How do I instantiate enum variants in Rust?",
"chunk_id": "reference/items/enumerations.md#enumerations-1",
"book": "reference"
},
{
"question": "Can local variables be aliased by existing references in Rust?",
"chunk_id": "nomicon/aliasing.md#why-aliasing-matters-3",
"book": "nomicon"
},
{
"question": "How do I use an async channel in Rust?",
"chunk_id": "book/ch17-02-concurrency-with-async.md#sending-data-between-two-tasks-using-message-passing-6",
"book": "book"
},
{
"question": "How do I write a byte string literal in Rust?",
"chunk_id": "rust-by-example/std/str.md#literals-and-escapes-4",
"book": "rust-by-example"
},
{
"question": "Does MaybeUninit avoid drops on partially initialized data during panic?",
"chunk_id": "nomicon/unchecked-uninit.md#unchecked-uninitialized-memory-3",
"book": "nomicon"
},
{
"question": "Do async functions run without being awaited?",
"chunk_id": "async-book/intro.md#hello-world-3",
"book": "async-book"
},
{
"question": "Do structs with only Send fields implement Send automatically?",
"chunk_id": "book/ch16-04-extensible-concurrency-sync-and-send.md#transferring-ownership-between-threads-1",
"book": "book"
},
{
"question": "Why must I add explicit lifetimes to functions returning references?",
"chunk_id": "book/ch12-04-testing-the-librarys-functionality.md#writing-a-failing-test-2",
"book": "book"
},
{
"question": "What replaced try! in modern Rust?",
"chunk_id": "rust-by-example/error/result/enter_question_mark.md#the-try-macro-1",
"book": "rust-by-example"
},
{
"question": "Can I have multiple panic handlers in dependencies?",
"chunk_id": "reference/panic.md#the-panic_handler-attribute-1",
"book": "reference"
},
{
"question": "How do I share a value safely across threads in Rust?",
"chunk_id": "book/ch16-03-shared-state.md#atomic-reference-counting-with-arct-8",
"book": "book"
},
{
"question": "Can I declare items inside a block expression?",
"chunk_id": "reference/items.md#items-0",
"book": "reference"
},
{
"question": "How do I annotate lifetimes on function signatures?",
"chunk_id": "book/ch10-03-lifetime-syntax.md#in-function-signatures-10",
"book": "book"
},
{
"question": "How do I call a function defined in the parent module?",
"chunk_id": "book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md#starting-relative-paths-with-super-10",
"book": "book"
},
{
"question": "How are repetitions (* and +) expressed in Rust grammar?",
"chunk_id": "reference/notation.md#grammar-1",
"book": "reference"
},
{
"question": "How do I group related data in Rust?",
"chunk_id": "book/ch04-03-slices.md#summary-11",
"book": "book"
},
{
"question": "What happens when Arc reference count overflows?",
"chunk_id": "nomicon/arc-mutex/arc-clone.md#cloning-2",
"book": "nomicon"
},
{
"question": "What does cargo test output look like?",
"chunk_id": "book/ch11-01-writing-tests.md#checking-results-with-assert-10",
"book": "book"
},
{
"question": "When should I mark a trait unsafe?",
"chunk_id": "nomicon/safe-unsafe-meaning.md#how-safe-and-unsafe-interact-4",
"book": "nomicon"
},
{
"question": "How do I install Rust?",
"chunk_id": "book/ch01-01-installation.md#installation-0",
"book": "book"
},
{
"question": "How do I declare a variable in Rust?",
"chunk_id": "rust-by-example/expression.md#expressions-0",
"book": "rust-by-example"
},
{
"question": "How to find the largest number in a Vec<i32>?",
"chunk_id": "book/ch10-00-generics.md#removing-duplication-by-extracting-a-function-1",
"book": "book"
},
{
"question": "How should I name labels in Rust inline assembly?",
"chunk_id": "rust-by-example/unsafe/asm.md#labels-15",
"book": "rust-by-example"
},
{
"question": "How do I await a JoinHandle returned by tokio::spawn?",
"chunk_id": "async-book/part-guide/async-await.md#joining-tasks-18",
"book": "async-book"
},
{
"question": "How do I specify parameters for a Rust function?",
"chunk_id": "reference/items/functions.md#functions-1",
"book": "reference"
},
{
"question": "What's the difference between a package and a crate?",
"chunk_id": "book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.md#packages-crates-and-modules-1",
"book": "book"
},
{
"question": "How to interpret cargo test summary \"1 passed; 0 failed\"?",
"chunk_id": "book/ch12-04-testing-the-librarys-functionality.md#storing-matching-lines-6",
"book": "book"
},
{
"question": "Does UnsafeCell cause invariance for lifetimes?",
"chunk_id": "reference/subtyping.md#variance-3",
"book": "reference"
},
{
"question": "How do I return a newly constructed struct from a function?",
"chunk_id": "book/ch05-01-defining-structs.md#defining-and-instantiating-structs-1",
"book": "book"
},
{
"question": "Why can't I derive Display for my type?",
"chunk_id": "book/appendix-03-derivable-traits.md#appendix-c-derivable-traits-0",
"book": "book"
},
{
"question": "Why does Rust auto-deref or auto-ref when calling methods?",
"chunk_id": "nomicon/dot-operator.md#the-dot-operator-0",
"book": "nomicon"
},
{
"question": "Does moving a non-Copy value make the original uninitialized?",
"chunk_id": "nomicon/checked-uninit.md#checked-uninitialized-memory-1",
"book": "nomicon"
},
{
"question": "Can I use let bindings inside match arm guards?",
"chunk_id": "reference/expressions/match-expr.md#match-expressions-0",
"book": "reference"
},
{
"question": "Are enum variants public by default?",
"chunk_id": "reference/visibility-and-privacy.md#visibility-and-privacy-0",
"book": "reference"
},
{
"question": "How do I enable Clippy's pedantic lints as warnings crate-wide?",
"chunk_id": "reference/attributes/diagnostics.md#tool-lint-attributes-8",
"book": "reference"
},
{
"question": "How do I return impl Future from a function?",
"chunk_id": "book/ch17-01-futures-and-syntax.md#defining-the-page_title-function-7",
"book": "book"
},
{
"question": "Does cargo test show separate sections per integration test file?",
"chunk_id": "book/ch11-03-test-organization.md#submodules-in-integration-tests-6",
"book": "book"
},
{
"question": "Can Drop leave my struct in an invalid state?",
"chunk_id": "nomicon/destructors.md#destructors-3",
"book": "nomicon"
},
{
"question": "How do I set initial capacity for a HashMap in Rust?",
"chunk_id": "rust-by-example/std/hash.md#hashmap-0",
"book": "rust-by-example"
},
{
"question": "Why can't push to Vec while holding reference to element?",
"chunk_id": "nomicon/lifetimes.md#example-aliasing-a-mutable-reference-4",
"book": "nomicon"
},
{
"question": "Do items declared inside a function have module paths?",
"chunk_id": "reference/statements.md#item-declarations-2",
"book": "reference"
},
{
"question": "What file extension does a Rust dylib use on macOS?",
"chunk_id": "reference/linkage.md#linkage-1",
"book": "reference"
},
{
"question": "What does $x:expr mean in Rust macro_rules! macros?",
"chunk_id": "book/ch20-05-macros.md#declarative-macros-for-general-metaprogramming-4",
"book": "book"
},
{
"question": "Rustonomicon or Reference for Rust type layout?",
"chunk_id": "nomicon/data.md#data-representation-in-rust-0",
"book": "nomicon"
},
{
"question": "How do I export a macro from my crate?",
"chunk_id": "reference/macros-by-example.md#the-macro_export-attribute-16",
"book": "reference"
},
{
"question": "How do I use Option to represent absence in Rust?",
"chunk_id": "book/ch06-00-enums.md#enums-and-pattern-matching-0",
"book": "book"
},
{
"question": "What types can xmm registers hold in Rust inline asm?",
"chunk_id": "reference/inline-assembly.md#register-operands-18",
"book": "reference"
},
{
"question": "Are common types like Vec and primitives Unpin?",
"chunk_id": "book/ch17-05-traits-for-async.md#the-pin-type-and-the-unpin-trait-12",
"book": "book"
},
{
"question": "When can a reference with longer lifetime act as shorter?",
"chunk_id": "nomicon/subtyping.md#subtyping-1",
"book": "nomicon"
},
{
"question": "Which rounding mode does Rust use for float casts?",
"chunk_id": "reference/expressions/operator-expr.md#enum-cast-23",
"book": "reference"
},
{
"question": "Can I use unsized types like [T] in struct fields?",
"chunk_id": "reference/trait-bounds.md#trait-and-lifetime-bounds-2",
"book": "reference"
},
{
"question": "What does cfg!(...) return?",
"chunk_id": "reference/conditional-compilation.md#the-cfg-macro-22",
"book": "reference"
},
{
"question": "When does Rust perform implicit type coercion?",
"chunk_id": "reference/type-coercions.md#coercion-sites-1",
"book": "reference"
},
{
"question": "What is the path dependency syntax in Cargo.toml?",
"chunk_id": "book/ch14-03-cargo-workspaces.md#creating-the-second-package-in-the-workspace-3",
"book": "book"
},
{
"question": "What signature should a Rust procedural macro have?",
"chunk_id": "book/ch20-05-macros.md#procedural-macros-for-generating-code-from-attributes-6",
"book": "book"
},
{
"question": "How do I ignore a function parameter in Rust?",
"chunk_id": "book/ch19-03-pattern-syntax.md#parts-of-a-value-with-a-nested-_-12",
"book": "book"
},
{
"question": "Are Rust closures and iterators fast?",
"chunk_id": "book/ch13-00-functional-features.md#functional-language-features-iterators-and-closures-0",
"book": "book"
},
{
"question": "How to show computed fields in Natvis for Rust?",
"chunk_id": "reference/attributes/debugger.md#using-debugger_visualizer-with-natvis-3",
"book": "reference"
},
{
"question": "What's the difference between async fn and async { }?",
"chunk_id": "async-book/part-guide/more-async-await.md#async-blocks-8",
"book": "async-book"
},
{
"question": "How can I move or clone a captured value?",
"chunk_id": "book/ch13-01-closures.md#moving-captured-values-out-of-closures-18",
"book": "book"
},
{
"question": "Why use Box<Self> in trait method signatures?",
"chunk_id": "book/ch18-03-oo-design-patterns.md#requesting-a-review-which-changes-the-posts-state-5",
"book": "book"
},
{
"question": "Do lint attributes inherit from parent modules?",
"chunk_id": "reference/attributes/diagnostics.md#lint-check-attributes-2",
"book": "reference"
},
{
"question": "Where can I read an RFC about Rust pinning design?",
"chunk_id": "async-book/part-reference/pinning.md#references-32",
"book": "async-book"
},
{
"question": "Can I use ? on chained method calls like open().read_to_string()?",
"chunk_id": "book/ch09-02-recoverable-errors-with-result.md#where-to-use-the--operator-12",
"book": "book"
},
{
"question": "Are Rust tests run in separate threads?",
"chunk_id": "book/ch11-01-writing-tests.md#structuring-test-functions-5",
"book": "book"
},
{
"question": "When is a type Unpin versus !Unpin?",
"chunk_id": "async-book/part-reference/pinning.md#unpin-7",
"book": "async-book"
},
{
"question": "Do callers need to ensure pointer lives until the future completes?",
"chunk_id": "reference/items/functions.md#combining-async-and-unsafe-10",
"book": "reference"
},
{
"question": "How do I accept incoming TcpStream connections?",
"chunk_id": "book/ch21-01-single-threaded.md#listening-to-the-tcp-connection-2",
"book": "book"
},
{
"question": "Why does my Rust closure only accept one type?",
"chunk_id": "book/ch13-01-closures.md#inferring-and-annotating-closure-types-8",
"book": "book"
},
{
"question": "How do I yield control in Tokio?",
"chunk_id": "async-book/part-guide/io.md#yielding-13",
"book": "async-book"
},
{
"question": "Can I define custom cfg flags for conditional compilation?",
"chunk_id": "rust-by-example/attribute/cfg/custom.md#custom-0",
"book": "rust-by-example"
},
{
"question": "What kinds of procedural macros exist?",
"chunk_id": "reference/procedural-macros.md#procedural-macros-0",
"book": "reference"
},
{
"question": "Does a[b] auto-deref to call the Index trait?",
"chunk_id": "reference/expressions/array-expr.md#array-and-slice-indexing-expressions-2",
"book": "reference"
},
{
"question": "How are doctests reported by cargo test?",
"chunk_id": "book/ch11-01-writing-tests.md#checking-results-with-assert-11",
"book": "book"
},
{
"question": "What sign does % return for negative dividends in Rust?",
"chunk_id": "reference/expressions/operator-expr.md#arithmetic-and-logical-binary-operators-13",
"book": "reference"
},
{
"question": "Does repr(C, packed) remove struct padding?",
"chunk_id": "nomicon/ffi.md#interoperability-with-foreign-code-20",
"book": "nomicon"
},
{
"question": "How to update cached average when modifying a list in Rust?",
"chunk_id": "book/ch18-01-what-is-oo.md#encapsulation-that-hides-implementation-details-3",
"book": "book"
},
{
"question": "How do I navigate the Rust Reference table of contents?",
"chunk_id": "reference/introduction.md#how-to-use-this-book-3",
"book": "reference"
},
{
"question": "Why do tests race when writing to the same file?",
"chunk_id": "rust-by-example/cargo/test.md#testing-1",
"book": "rust-by-example"
},
{
"question": "When should I use unsafe blocks?",
"chunk_id": "nomicon/safe-unsafe-meaning.md#how-safe-and-unsafe-interact-0",
"book": "nomicon"
},
{
"question": "Why does Rust use self as the first method parameter?",
"chunk_id": "book/ch05-03-method-syntax.md#methods-0",
"book": "book"
},
{
"question": "Why does Rust warn 'unused `Result` that must be used'?",
"chunk_id": "book/ch12-03-improving-error-handling-and-modularity.md#handling-errors-returned-from-run-in-main-17",
"book": "book"
},
{
"question": "Can different Rust stdlib versions cause panics to abort across crates?",
"chunk_id": "reference/panic.md#unwinding-across-ffi-boundaries-5",
"book": "reference"
},
{
"question": "How do I call a C function with ... from Rust?",
"chunk_id": "nomicon/ffi.md#variadic-functions-21",
"book": "nomicon"
},
{
"question": "How much memory does a Rust enum value take?",
"chunk_id": "reference/types/enum.md#enumerated-types-0",
"book": "reference"
},
{
"question": "How to collect Iterator<Result<_, _>> into a single Result?",
"chunk_id": "rust-by-example/error/iter_result.md#fail-the-entire-operation-with-collect-3",
"book": "rust-by-example"
},
{
"question": "How do I write a line doc comment for crate-level docs?",
"chunk_id": "reference/comments.md#comments-0",
"book": "reference"
},
{
"question": "How do I define methods on a Rust struct?",
"chunk_id": "rust-by-example/fn/methods.md#associated-functions--methods-1",
"book": "rust-by-example"
},
{
"question": "What does Weak::upgrade return when target Rc was dropped?",
"chunk_id": "book/ch15-06-reference-cycles.md#visualizing-changes-to-strong_count-and-weak_count-12",
"book": "book"
},
{
"question": "How do I write a generic function in Rust?",
"chunk_id": "rust-by-example/generics.md#generics-0",
"book": "rust-by-example"
},
{
"question": "Why can't I move t.0 while closure borrows t.1?",
"chunk_id": "reference/types/closure.md#reference-into-unaligned-structs-18",
"book": "reference"
},
{
"question": "How do I make a variable mutable in Rust?",
"chunk_id": "rust-by-example/variable_bindings/mut.md#mutability-0",
"book": "rust-by-example"
},
{
"question": "How to accept any type implementing a trait as a parameter",
"chunk_id": "reference/types/impl-trait.md#impl-trait-0",
"book": "reference"
},
{
"question": "How to handle Result errors without using match in Rust?",
"chunk_id": "book/ch09-02-recoverable-errors-with-result.md#alternatives-to-using-match-with-resultt-e-4",
"book": "book"
},
{
"question": "Why does borrowing one union field block borrowing other fields?",
"chunk_id": "reference/items/unions.md#references-to-union-fields-4",
"book": "reference"
},
{
"question": "How do I pass a struct to a function by reference?",
"chunk_id": "book/ch05-02-example-structs.md#refactoring-with-structs-3",
"book": "book"
},
{
"question": "How do I run expensive or slow tests separately?",
"chunk_id": "book/ch11-02-running-tests.md#ignoring-tests-unless-specifically-requested-9",
"book": "book"
},
{
"question": "How can I keep errors visible when redirecting stdout?",
"chunk_id": "book/ch12-06-writing-to-stderr-instead-of-stdout.md#checking-where-errors-are-written-1",
"book": "book"
},
{
"question": "How to write a simple if/else example in Rust?",
"chunk_id": "book/ch03-05-control-flow.md#if-expressions-2",
"book": "book"
},
{
"question": "How do I clone Strings from a slice of Strings?",
"chunk_id": "book/ch12-03-improving-error-handling-and-modularity.md#creating-a-constructor-for-config-7",
"book": "book"
},
{
"question": "How to use the ? operator with Result in Rust",
"chunk_id": "rust-by-example/std/result/question_mark.md#section-1",
"book": "rust-by-example"
},
{
"question": "Can derive macros read attributes on generic parameters?",
"chunk_id": "reference/items/generics.md#attributes-8",
"book": "reference"
},
{
"question": "How do I pass a function or static with sym?",
"chunk_id": "reference/inline-assembly.md#operand-type-10",
"book": "reference"
}
] |