tree: 3237430ccedc1e0b1028d9bcccb84f367e3d2d8a [path history] [tgz]
  1. abi/
  2. alloc-error/
  3. allocator/
  4. annotate-snippet/
  5. anon-params/
  6. argfile/
  7. argument-suggestions/
  8. array-slice-vec/
  9. asm/
  10. associated-consts/
  11. associated-inherent-types/
  12. associated-item/
  13. associated-type-bounds/
  14. associated-types/
  15. async-await/
  16. attributes/
  17. auto-traits/
  18. autodiff/
  19. autoref-autoderef/
  20. auxiliary/
  21. backtrace/
  22. bench/
  23. binding/
  24. binop/
  25. blind/
  26. block-result/
  27. bootstrap/
  28. borrowck/
  29. box/
  30. btreemap/
  31. builtin-superkinds/
  32. c-variadic/
  33. cast/
  34. cfg/
  35. check-cfg/
  36. closure-expected-type/
  37. closure_context/
  38. closures/
  39. cmse-nonsecure/
  40. codegen/
  41. codemap_tests/
  42. coercion/
  43. coherence/
  44. coinduction/
  45. command/
  46. compare-method/
  47. compiletest-self-test/
  48. conditional-compilation/
  49. confuse-field-and-method/
  50. const-generics/
  51. const-ptr/
  52. const_prop/
  53. consts/
  54. contracts/
  55. coroutine/
  56. coverage-attr/
  57. crate-loading/
  58. cross/
  59. cross-crate/
  60. custom_test_frameworks/
  61. cycle-trait/
  62. dataflow_const_prop/
  63. debuginfo/
  64. definition-reachable/
  65. delegation/
  66. dep-graph/
  67. deprecation/
  68. deref-patterns/
  69. derived-errors/
  70. derives/
  71. deriving/
  72. dest-prop/
  73. destructuring-assignment/
  74. diagnostic-flags/
  75. diagnostic-width/
  76. diagnostic_namespace/
  77. did_you_mean/
  78. directory_ownership/
  79. disallowed-deconstructing/
  80. dollar-crate/
  81. drop/
  82. drop-bounds/
  83. dropck/
  84. dst/
  85. duplicate/
  86. dyn-compatibility/
  87. dyn-drop/
  88. dyn-keyword/
  89. dyn-star/
  90. dynamically-sized-types/
  91. editions/
  92. empty/
  93. entry-point/
  94. enum/
  95. enum-discriminant/
  96. env-macro/
  97. ergonomic-clones/
  98. error-codes/
  99. error-emitter/
  100. errors/
  101. explicit/
  102. explicit-tail-calls/
  103. expr/
  104. extern/
  105. extern-flag/
  106. feature-gates/
  107. ffi-attrs/
  108. float/
  109. fmt/
  110. fn/
  111. fn-main/
  112. for/
  113. for-loop-while/
  114. force-inlining/
  115. foreign/
  116. fully-qualified-type/
  117. function-pointer/
  118. functional-struct-update/
  119. functions-closures/
  120. generic-associated-types/
  121. generic-const-items/
  122. generics/
  123. half-open-range-patterns/
  124. hashmap/
  125. hello_world/
  126. higher-ranked/
  127. hygiene/
  128. illegal-sized-bound/
  129. impl-header-lifetime-elision/
  130. impl-trait/
  131. implied-bounds/
  132. imports/
  133. include-macros/
  134. incoherent-inherent-impls/
  135. indexing/
  136. inference/
  137. infinite/
  138. inherent-impls-overlap-check/
  139. inline-const/
  140. instrument-coverage/
  141. instrument-xray/
  142. interior-mutability/
  143. internal/
  144. internal-lints/
  145. intrinsics/
  146. invalid/
  147. invalid-compile-flags/
  148. invalid-module-declaration/
  149. invalid-self-argument/
  150. io-checks/
  151. issues/
  152. iterators/
  153. json/
  154. keyword/
  155. kindck/
  156. label/
  157. lang-items/
  158. late-bound-lifetimes/
  159. layout/
  160. lazy-type-alias/
  161. lazy-type-alias-impl-trait/
  162. let-else/
  163. lexer/
  164. lifetimes/
  165. limits/
  166. link-native-libs/
  167. linkage-attr/
  168. linking/
  169. lint/
  170. liveness/
  171. loops/
  172. lowering/
  173. lto/
  174. lub-glb/
  175. macro_backtrace/
  176. macros/
  177. malformed/
  178. marker_trait_attr/
  179. match/
  180. meta/
  181. methods/
  182. mir/
  183. mir-dataflow/
  184. mismatched_types/
  185. missing/
  186. missing-trait-bounds/
  187. missing_non_modrs_mod/
  188. modules/
  189. modules_and_files_visibility/
  190. moves/
  191. mut/
  192. namespace/
  193. never_type/
  194. new-range/
  195. nll/
  196. no_std/
  197. non_modrs_mods/
  198. non_modrs_mods_and_inline_mods/
  199. not-panic/
  200. numbers-arithmetic/
  201. numeric/
  202. object-lifetime/
  203. obsolete-in-place/
  204. offset-of/
  205. on-unimplemented/
  206. operator-recovery/
  207. or-patterns/
  208. overloaded/
  209. packed/
  210. panic-handler/
  211. panic-runtime/
  212. panics/
  213. parallel-rustc/
  214. parser/
  215. patchable-function-entry/
  216. pattern/
  217. pin-macro/
  218. precondition-checks/
  219. print-request/
  220. print_type_sizes/
  221. privacy/
  222. proc-macro/
  223. process/
  224. process-termination/
  225. ptr_ops/
  226. pub/
  227. qualified/
  228. query-system/
  229. range/
  230. raw-ref-op/
  231. reachable/
  232. recursion/
  233. recursion_limit/
  234. regions/
  235. repeat-expr/
  236. repr/
  237. reserved/
  238. resolve/
  239. return/
  240. rfcs/
  241. rmeta/
  242. runtime/
  243. rust-2018/
  244. rust-2021/
  245. rust-2024/
  246. rustc-env/
  247. rustdoc/
  248. sanitizer/
  249. self/
  250. sepcomp/
  251. shadowed/
  252. shell-argfiles/
  253. simd/
  254. single-use-lifetime/
  255. sized/
  256. span/
  257. specialization/
  258. stability-attribute/
  259. stable-mir-print/
  260. stack-protector/
  261. static/
  262. statics/
  263. stats/
  264. std/
  265. stdlib-unit-tests/
  266. str/
  267. structs/
  268. structs-enums/
  269. suggestions/
  270. svh/
  271. symbol-mangling-version/
  272. symbol-names/
  273. sync/
  274. target-feature/
  275. target_modifiers/
  276. test-attrs/
  277. thir-print/
  278. thread-local/
  279. threads-sendsync/
  280. tool-attributes/
  281. track-diagnostics/
  282. trait-bounds/
  283. traits/
  284. transmutability/
  285. transmute/
  286. treat-err-as-bug/
  287. trivial-bounds/
  288. try-block/
  289. try-trait/
  290. tuple/
  291. type/
  292. type-alias/
  293. type-alias-enum-variants/
  294. type-alias-impl-trait/
  295. type-inference/
  296. typeck/
  297. typeof/
  298. ufcs/
  299. unboxed-closures/
  300. underscore-imports/
  301. underscore-lifetime/
  302. uniform-paths/
  303. uninhabited/
  304. union/
  305. unknown-unstable-lints/
  306. unop/
  307. unpretty/
  308. unresolved/
  309. unsafe/
  310. unsafe-binders/
  311. unsafe-fields/
  312. unsized/
  313. unsized-locals/
  314. unused-crate-deps/
  315. unwind-abis/
  316. use/
  317. variance/
  318. variants/
  319. version/
  320. warnings/
  321. wasm/
  322. wf/
  323. where-clauses/
  324. while/
  325. windows-subsystem/
  326. zero-sized/
  327. .gitattributes
  328. amdgpu-require-explicit-cpu.nocpu.stderr
  329. amdgpu-require-explicit-cpu.rs
  330. augmented-assignments-feature-gate-cross.rs
  331. augmented-assignments-rpass.rs
  332. augmented-assignments.rs
  333. augmented-assignments.stderr
  334. auto-instantiate.rs
  335. auto-ref-slice-plus-ref.rs
  336. auto-ref-slice-plus-ref.stderr
  337. autoderef-full-lval.rs
  338. autoderef-full-lval.stderr
  339. bare-fn-implements-fn-mut.rs
  340. bare-static-string.rs
  341. big-literals.rs
  342. bind-by-move.rs
  343. bitwise.rs
  344. bogus-tag.rs
  345. bogus-tag.stderr
  346. borrow-by-val-method-receiver.rs
  347. bounds-lifetime.rs
  348. bounds-lifetime.stderr
  349. break-diverging-value.rs
  350. break-diverging-value.stderr
  351. builtin-clone-unwind.rs
  352. can-copy-pod.rs
  353. cancel-clean-via-immediate-rvalue-ref.rs
  354. cannot-mutate-captured-non-mut-var.rs
  355. cannot-mutate-captured-non-mut-var.stderr
  356. capture1.rs
  357. capture1.stderr
  358. catch-unwind-bang.rs
  359. cenum_impl_drop_cast.rs
  360. cenum_impl_drop_cast.stderr
  361. cfguard-run.rs
  362. char.rs
  363. class-cast-to-trait.rs
  364. class-cast-to-trait.stderr
  365. class-method-missing.rs
  366. class-method-missing.stderr
  367. cleanup-rvalue-for-scope.rs
  368. cleanup-rvalue-scopes-cf.rs
  369. cleanup-rvalue-scopes-cf.stderr
  370. cleanup-rvalue-scopes.rs
  371. cleanup-rvalue-temp-during-incomplete-alloc.rs
  372. cleanup-shortcircuit.rs
  373. close-over-big-then-small-data.rs
  374. command-line-diagnostics.rs
  375. command-line-diagnostics.stderr
  376. complex.rs
  377. conservative_impl_trait.rs
  378. conservative_impl_trait.stderr
  379. constructor-lifetime-args.rs
  380. constructor-lifetime-args.stderr
  381. copy-a-resource.rs
  382. copy-a-resource.stderr
  383. crate-leading-sep.rs
  384. crate-method-reexport-grrrrrrr.rs
  385. crate-name-attr-used.rs
  386. crate-name-mismatch.rs
  387. crate-name-mismatch.stderr
  388. crate_type_flag.rs
  389. crate_type_flag.stderr
  390. custom-attribute-multisegment.rs
  391. custom-attribute-multisegment.stderr
  392. custom-test-frameworks-simple.rs
  393. custom_attribute.rs
  394. custom_attribute.stderr
  395. deduplicate-diagnostics.deduplicate.stderr
  396. deduplicate-diagnostics.duplicate.stderr
  397. deduplicate-diagnostics.rs
  398. deep.rs
  399. default-method-parsing.rs
  400. default-method-simple.rs
  401. defaults-well-formedness.rs
  402. deprecation-in-force-unstable.rs
  403. deref-non-pointer.rs
  404. deref-non-pointer.stderr
  405. deref-rc.rs
  406. deref.rs
  407. derive-uninhabited-enum-38885.rs
  408. derive-uninhabited-enum-38885.stderr
  409. destructure-trait-ref.rs
  410. destructure-trait-ref.stderr
  411. diverging-fallback-method-chain.rs
  412. diverging-fallback-option.rs
  413. diverging-fn-tail-35849.rs
  414. diverging-fn-tail-35849.stderr
  415. double-ref.rs
  416. double-type-import.rs
  417. double-type-import.stderr
  418. early-ret-binop-add.rs
  419. elide-errors-on-mismatched-tuple.rs
  420. elide-errors-on-mismatched-tuple.stderr
  421. elided-test.rs
  422. elided-test.stderr
  423. else-if.rs
  424. empty-allocation-non-null.rs
  425. empty-allocation-rvalue-non-null.rs
  426. empty-type-parameter-list.rs
  427. empty-type-parameter-list.stderr
  428. error-festival.rs
  429. error-festival.stderr
  430. error-should-say-copy-not-pod.rs
  431. error-should-say-copy-not-pod.stderr
  432. exclusive-drop-and-copy.rs
  433. exclusive-drop-and-copy.stderr
  434. explain.rs
  435. explain.stdout
  436. explicit-i-suffix.rs
  437. explore-issue-38412.rs
  438. explore-issue-38412.stderr
  439. ext-expand-inner-exprs.rs
  440. ext-nonexistent.rs
  441. ext-nonexistent.stderr
  442. fact.rs
  443. fail-simple.rs
  444. fail-simple.stderr
  445. filter-block-view-items.rs
  446. format-no-std.rs
  447. fun-indirect-call.rs
  448. future-incompatible-lint-group.rs
  449. future-incompatible-lint-group.stderr
  450. global-scope.rs
  451. hello.rs
  452. illegal-ufcs-drop.fixed
  453. illegal-ufcs-drop.rs
  454. illegal-ufcs-drop.stderr
  455. impl-inherent-non-conflict.rs
  456. impl-not-adjacent-to-type.rs
  457. impl-privacy-xc-1.rs
  458. impl-unused-rps-in-assoc-type.rs
  459. impl-unused-rps-in-assoc-type.stderr
  460. impl-unused-tps-inherent.rs
  461. impl-unused-tps-inherent.stderr
  462. impl-unused-tps.rs
  463. impl-unused-tps.stderr
  464. implicit-method-bind.rs
  465. implicit-method-bind.stderr
  466. inline-disallow-on-variant.rs
  467. inline-disallow-on-variant.stderr
  468. inlined-main.rs
  469. inner-attrs-on-impl.rs
  470. inner-module.rs
  471. inner-static-type-parameter.rs
  472. inner-static-type-parameter.stderr
  473. inner-static.rs
  474. integral-indexing.rs
  475. integral-indexing.stderr
  476. integral-variable-unification-error.rs
  477. integral-variable-unification-error.stderr
  478. invalid_dispatch_from_dyn_impls.rs
  479. invalid_dispatch_from_dyn_impls.stderr
  480. issue-11881.rs
  481. issue-13560.rs
  482. issue-15924.rs
  483. issue-16822.rs
  484. issue-18502.rs
  485. issue-24106.rs
  486. issue-76387-llvm-miscompile.rs
  487. issues-71798.rs
  488. issues-71798.stderr
  489. item-name-overload.rs
  490. kinds-in-metadata.rs
  491. kinds-of-primitive-impl.rs
  492. kinds-of-primitive-impl.stderr
  493. last-use-in-block.rs
  494. last-use-in-cap-clause.rs
  495. last-use-is-capture.rs
  496. lazy-and-or.rs
  497. lexical-scopes.rs
  498. lexical-scopes.stderr
  499. lexical-scoping.rs
  500. link-section.rs
  501. list.rs
  502. log-err-phi.rs
  503. log-knows-the-names-of-variants.rs
  504. log-poly.rs
  505. logging-only-prints-once.rs
  506. loud_ui.rs
  507. max-min-classes.rs
  508. maximal_mir_to_hir_coverage.rs
  509. maybe-bounds.rs
  510. maybe-bounds.stderr
  511. method-output-diff-issue-127263.rs
  512. method-output-diff-issue-127263.stderr
  513. minus-string.rs
  514. minus-string.stderr
  515. missing_debug_impls.rs
  516. missing_debug_impls.stderr
  517. mod-subitem-as-enum-variant.rs
  518. mod-subitem-as-enum-variant.stderr
  519. monomorphize-abi-alignment.rs
  520. msvc-data-only.rs
  521. msvc-opt-minsize.rs
  522. multibyte.rs
  523. multiline-comment.rs
  524. mut-function-arguments.rs
  525. mutual-recursion-group.rs
  526. myriad-closures.rs
  527. nested-block-comment.rs
  528. nested-cfg-attrs.rs
  529. nested-cfg-attrs.stderr
  530. nested-class.rs
  531. nested-ty-params.rs
  532. nested-ty-params.stderr
  533. new-impl-syntax.rs
  534. new-import-syntax.rs
  535. new-style-constants.rs
  536. new-unicode-escapes.rs
  537. newlambdas.rs
  538. newtype-polymorphic.rs
  539. newtype.rs
  540. no-capture-arc.rs
  541. no-capture-arc.stderr
  542. no-core-1.rs
  543. no-core-2.rs
  544. no-link-unknown-crate.rs
  545. no-link-unknown-crate.stderr
  546. no-reuse-move-arc.rs
  547. no-reuse-move-arc.stderr
  548. no-send-res-ports.rs
  549. no-send-res-ports.stderr
  550. no-warn-on-field-replace-issue-34101.rs
  551. no_send-enum.rs
  552. no_send-enum.stderr
  553. no_send-rc.rs
  554. no_send-rc.stderr
  555. no_share-enum.rs
  556. no_share-enum.stderr
  557. no_share-struct.rs
  558. no_share-struct.stderr
  559. noexporttypeexe.rs
  560. noexporttypeexe.stderr
  561. non-constant-expr-for-arr-len.rs
  562. non-constant-expr-for-arr-len.stderr
  563. non-copyable-void.rs
  564. non-copyable-void.stderr
  565. non-fmt-panic.fixed
  566. non-fmt-panic.rs
  567. non-fmt-panic.stderr
  568. noncopyable-class.rs
  569. noncopyable-class.stderr
  570. nonscalar-cast.fixed
  571. nonscalar-cast.rs
  572. nonscalar-cast.stderr
  573. not-clone-closure.rs
  574. not-clone-closure.stderr
  575. not-copy-closure.rs
  576. not-copy-closure.stderr
  577. not-enough-arguments.rs
  578. not-enough-arguments.stderr
  579. nul-characters.rs
  580. nullable-pointer-iotareduction.rs
  581. nullable-pointer-size.rs
  582. object-pointer-types.rs
  583. object-pointer-types.stderr
  584. objects-coerce-freeze-borrored.rs
  585. occurs-check-2.rs
  586. occurs-check-2.stderr
  587. occurs-check-3.rs
  588. occurs-check-3.stderr
  589. occurs-check.rs
  590. occurs-check.stderr
  591. once-cant-call-twice-on-heap.rs
  592. once-cant-call-twice-on-heap.stderr
  593. oom_unwind.rs
  594. op-assign-builtins-by-ref.rs
  595. opeq.rs
  596. opt-in-copy.rs
  597. opt-in-copy.stderr
  598. optimization-remark.rs
  599. out-pointer-aliasing.rs
  600. output-slot-variants.rs
  601. over-constrained-vregs.rs
  602. panic-while-printing.rs
  603. panic_implementation-closures.rs
  604. paren-span.rs
  605. paren-span.stderr
  606. partialeq_help.rs
  607. partialeq_help.stderr
  608. path-lookahead.fixed
  609. path-lookahead.rs
  610. path-lookahead.stderr
  611. path.rs
  612. paths-containing-nul.rs
  613. phantom-auto-trait.rs
  614. phantom-auto-trait.stderr
  615. point-to-type-err-cause-on-impl-trait-return-2.rs
  616. point-to-type-err-cause-on-impl-trait-return-2.stderr
  617. pptypedef.rs
  618. pptypedef.stderr
  619. primitive-binop-lhs-mut.rs
  620. print-calling-conventions.rs
  621. print-calling-conventions.stdout
  622. print-stdout-eprint-stderr.rs
  623. project-cache-issue-31849.rs
  624. ptr-coercion-rpass.rs
  625. ptr-coercion.rs
  626. ptr-coercion.stderr
  627. query-visibility.rs
  628. raw-str.rs
  629. README.md
  630. realloc-16687.rs
  631. reassign-ref-mut.rs
  632. reassign-ref-mut.stderr
  633. reexport-test-harness-main.rs
  634. removing-extern-crate.fixed
  635. removing-extern-crate.rs
  636. removing-extern-crate.stderr
  637. resource-assign-is-not-copy.rs
  638. resource-destruct.rs
  639. seq-args.rs
  640. seq-args.stderr
  641. shadow-bool.rs
  642. shadowed-use-visibility.rs
  643. short-error-format.rs
  644. short-error-format.stderr
  645. sized-borrowed-pointer.rs
  646. sized-cycle-note.rs
  647. sized-cycle-note.stderr
  648. sized-owned-pointer.rs
  649. sse2.rs
  650. stable-addr-of.rs
  651. std-uncopyable-atomics.rs
  652. std-uncopyable-atomics.stderr
  653. stdio-is-blocking.rs
  654. string-box-error.rs
  655. struct-ctor-mangling.rs
  656. super-at-top-level.rs
  657. super-at-top-level.stderr
  658. super-let.borrowck.stderr
  659. super-let.rs
  660. super.rs
  661. svh-add-nothing.rs
  662. swap-1.rs
  663. swap-overlapping.rs
  664. switched-expectations.rs
  665. switched-expectations.stderr
  666. syntax-extension-minor.rs
  667. tag-type-args.rs
  668. tag-type-args.stderr
  669. tag-variant-cast-non-nullary.fixed
  670. tag-variant-cast-non-nullary.rs
  671. tag-variant-cast-non-nullary.stderr
  672. tail-call-arg-leak.rs
  673. tail-cps.rs
  674. tail-typeck.rs
  675. tail-typeck.stderr
  676. trailing-comma.rs
  677. trait-method-number-parameters.rs
  678. trait-method-number-parameters.stderr
  679. transmute-equal-assoc-types.rs
  680. transmute-non-immediate-to-immediate.rs
  681. trivial_casts-rpass.rs
  682. trivial_casts-rpass.stderr
  683. try-from-int-error-partial-eq.rs
  684. try-operator-hygiene.rs
  685. try-operator.rs
  686. tydesc-name.rs
  687. type-id-higher-rank-2.rs
  688. type-namespace.rs
  689. type-param-constraints.rs
  690. type-param.rs
  691. type-ptr.rs
  692. type-use-i1-versus-i8.rs
  693. type_length_limit.rs
  694. type_length_limit.stderr
  695. typeid-intrinsic.rs
  696. typestate-multi-decl.rs
  697. unconstrained-none.rs
  698. unconstrained-none.stderr
  699. unconstrained-ref.rs
  700. unconstrained-ref.stderr
  701. underscore-ident-matcher.rs
  702. underscore-ident-matcher.stderr
  703. underscore-lifetimes.rs
  704. underscore-method-after-integer.rs
  705. unevaluated_fixed_size_array_len.rs
  706. unevaluated_fixed_size_array_len.stderr
  707. uninit-empty-types.rs
  708. unit.rs
  709. unknown-language-item.rs
  710. unknown-language-item.stderr
  711. unknown-llvm-arg.rs
  712. unknown-llvm-arg.stderr
  713. unnamed_argument_mode.rs
  714. unreachable-code-1.rs
  715. unreachable-code.rs
  716. unsigned-literal-negation.rs
  717. unsigned-literal-negation.stderr
  718. unused-move-capture.rs
  719. unused-move.rs
  720. unwind-no-uwtable.rs
  721. use-import-export.rs
  722. use-keyword-2.rs
  723. use-module-level-int-consts.rs
  724. use-nested-groups.rs
  725. used.rs
  726. used.stderr
  727. usize-generic-argument-parent.rs
  728. usize-generic-argument-parent.stderr
  729. utf8-bom.rs
  730. utf8_idents.rs
  731. virtual-call-attrs-issue-137646.rs
  732. wait-forked-but-failed-child.rs
  733. walk-struct-literal-with.rs
  734. walk-struct-literal-with.stderr
  735. weak-new-uninhabited-issue-48493.rs
  736. weird-exit-code.rs
  737. weird-exprs.rs
  738. write-fmt-errors.rs
  739. writing-to-immutable-vec.rs
  740. writing-to-immutable-vec.stderr
  741. wrong-hashset-issue-42918.rs
tests/ui/README.md

UI Tests

This folder contains rustc's UI tests.

Test Directives (Headers)

Typically, a UI test will have some test directives / headers which are special comments that tell compiletest how to build and interpret a test.

As part of an ongoing effort to rewrite compiletest (see https://github.com/rust-lang/compiler-team/issues/536), a major change proposal to change legacy compiletest-style headers // <directive> to ui_test-style headers //@ <directive> was accepted (see https://github.com/rust-lang/compiler-team/issues/512.

An example directive is ignore-test. In legacy compiletest style, the header would be written as

// ignore-test

but in ui_test style, the header would be written as

//@ ignore-test

compiletest is changed to accept only //@ directives for UI tests (currently), and will reject and report an error if it encounters any comments // <content> that may be parsed as a legacy compiletest-style test header. To fix this, you should migrate to the ui_test-style header //@ <content>.