mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
Rollup merge of #139705 - jieyouxu:tests-precursor, r=compiler-errors
Removed outdated ui test suite README, give reasons for disabled tests ### Changes - `tests/ui/README.md` is very outdated, test suite docs should consistently live in rustc-dev-guide. - Add reasons for `//@ ignore-test` tests that don't have one.[^query] This is a precursor change to make follow-up changes easier (possibly more specialized directives or converting some auxiliaries into the canonical `auxiliary/` form). [^query]: searched via `rg --no-ignore -F -e "ignore-test" tests/`.
This commit is contained in:
commit
0e50fda4b6
@ -1,35 +0,0 @@
|
||||
# UI Tests
|
||||
|
||||
This folder contains `rustc`'s
|
||||
[UI tests](https://rustc-dev-guide.rust-lang.org/tests/ui.html).
|
||||
|
||||
## 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`](https://github.com/oli-obk/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
|
||||
|
||||
```rs
|
||||
// ignore-test
|
||||
```
|
||||
|
||||
but in `ui_test` style, the header would be written as
|
||||
|
||||
```rs
|
||||
//@ 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>`.
|
@ -1,2 +1,2 @@
|
||||
//! Not used by compiler, this is used by bootstrap cli self-test.
|
||||
//@ ignore-test
|
||||
//@ ignore-test (used by bootstrap)
|
||||
|
@ -1,2 +1,2 @@
|
||||
//! Not used by compiler, used by bootstrap cli self-test.
|
||||
//@ ignore-test
|
||||
//@ ignore-test (used by bootstrap)
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ ignore-test
|
||||
//@ ignore-test (auxiliary)
|
||||
|
||||
// Companion to allow-in-other-module.rs
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
|
||||
//@ error-pattern: unsafe precondition(s) violated: ptr::read requires
|
||||
//@ revisions: null misaligned
|
||||
//@ ignore-test
|
||||
//@ ignore-test (unimplemented)
|
||||
|
||||
use std::ptr;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
|
||||
//@ error-pattern: unsafe precondition(s) violated: ptr::write requires
|
||||
//@ revisions: null misaligned
|
||||
//@ ignore-test
|
||||
//@ ignore-test (unimplemented)
|
||||
|
||||
use std::ptr;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
|
||||
//@ error-pattern: unsafe precondition(s) violated: ptr::write requires
|
||||
//@ revisions: null misaligned
|
||||
//@ ignore-test
|
||||
//@ ignore-test (unimplemented)
|
||||
|
||||
use std::ptr;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
//@ ignore-test
|
||||
//@ ignore-test (see #114196)
|
||||
|
||||
trait Trait {
|
||||
type Gat<'lt>;
|
||||
|
Loading…
Reference in New Issue
Block a user