rust/src/test/ui
bors 6d841da4a0 Auto merge of #39999 - bitshifter:struct_align, r=eddyb
Implementation of repr struct alignment RFC 1358.

The main changes around rustc::ty::Layout::struct:
* Added abi_align field which stores abi alignment before repr align is applied
* align field contains transitive repr alignment
* Added padding vec which stores padding required after fields

The main user of this information is rustc_trans::adt::struct_llfields
which determines the LLVM fields to be used by LLVM, including padding
fields.

A possible future optimisation would be to put the padding Vec in an Option, since it will be unused unless you are using repr align.
2017-04-22 11:50:40 +00:00
..
check_match
codemap_tests Move 'coherence-overlapping-inherent-impl-trait' test to ui 2017-04-04 21:08:56 +09:00
compare-method Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
cross-crate-macro-backtrace
did_you_mean Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
dropck Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
fmt
hello_world
impl-trait Explicit help message for binop type missmatch 2017-04-10 14:28:38 -07:00
issue-37311-type-length-limit Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
lifetime-errors Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
lifetimes
lint
macros Refactor how spans are combined in the parser. 2017-03-29 11:17:59 +00:00
mismatched_types Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
missing-items Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
print_type_sizes Added feature gate, updated error messages and tests. 2017-04-21 07:37:10 +10:00
print-fuel UI test for -Z print-fuel=foo 2017-04-11 14:36:08 +03:00
pub Add diagnostic for incorrect pub (restriction) 2017-03-22 22:51:45 -07:00
reachable cherry-pick over the tests I wrote for the reachability code 2017-03-30 07:55:29 -04:00
resolve Add a way to get shorter spans until char for pointing at defs 2017-04-12 01:10:48 -07:00
span Rollup merge of #41435 - estebank:issue-33884, r=nikomatsakis 2017-04-21 23:29:15 -04:00
suggestions Rollup merge of #41087 - estebank:tuple-float-index, r=arielb1 2017-04-12 14:45:41 +02:00
token libsyntax/parse: improve associated item error reporting 2017-04-17 21:25:35 +03:00
type-check Reduce visual clutter of multiline start when possible 2017-04-20 17:31:20 -07:00
loop-break-value-no-repeat.rs rework how we handle the type of loops 2017-03-30 07:55:29 -04:00
loop-break-value-no-repeat.stderr rework how we handle the type of loops 2017-03-30 07:55:29 -04:00
README.md
regions-fn-subtyping-return-static.rs
regions-fn-subtyping-return-static.stderr
update-all-references.sh
update-references.sh

Guide to the UI Tests

The UI tests are intended to capture the compiler's complete output, so that we can test all aspects of the presentation. They work by compiling a file (e.g., hello_world/main.rs), capturing the output, and then applying some normalization (see below). This normalized result is then compared against reference files named hello_world/main.stderr and hello_world/main.stdout. If either of those files doesn't exist, the output must be empty. If the test run fails, we will print out the current output, but it is also saved in build/<target-triple>/test/ui/hello_world/main.stdout (this path is printed as part of the test failure mesage), so you can run diff and so forth.

Editing and updating the reference files

If you have changed the compiler's output intentionally, or you are making a new test, you can use the script update-references.sh to update the references. When you run the test framework, it will report various errors: in those errors is a command you can use to run the update-references.sh script, which will then copy over the files from the build directory and use them as the new reference. You can also just run update-all-references.sh. In both cases, you can run the script with --help to get a help message.

Normalization

The normalization applied is aimed at filenames:

  • the test directory is replaced with $DIR
  • all backslashes () are converted to forward slashes (/) (for windows)