Files
rust/tests/ui
Matthias Krüger 4b7e55ada3 Rollup merge of #133925 - folkertdev:improve-repr-warnings, r=compiler-errors
disallow `repr()` on invalid items

fixes https://github.com/rust-lang/rust/issues/129606
fixes https://github.com/rust-lang/rust/issues/132391

Disallows `repr()` (so a repr with no arguments) on items where that won't ever make sense.

Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here:

https://github.com/rust-lang/rust/pull/110313/files

Which first accepts the align attribute on trait methods.

r? `@compiler-errors`

cc `@jdonszelmann` who claimed https://github.com/rust-lang/rust/issues/132391 and generally has been working on attributes
2025-02-06 21:56:24 +01:00
..
2025-02-04 10:57:49 +00:00
…
…
2025-01-24 22:08:39 +00:00
…
2025-01-24 18:33:00 +01:00
…
…
2025-01-30 17:10:19 +00:00
2025-02-03 10:39:32 -05:00
2025-02-03 10:39:32 -05:00
2025-02-04 21:42:43 +05:30
…
2025-01-28 19:35:51 +00:00
2025-01-26 13:55:59 +00:00
2025-02-03 10:39:32 -05:00
…
2025-01-30 20:37:56 -07:00
…
…
…
…
2025-01-29 15:45:13 +00:00
…
…
2025-02-03 19:00:22 +00:00
…
…
2025-02-04 21:42:43 +05:30
…
…
…
…
…
…
…
…
…
…
…
…
…
…

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>.