Skip to content

Commit

Permalink
Rollup merge of rust-lang#78570 - sasurau4:test/check-pass-print-type…
Browse files Browse the repository at this point in the history
…-size, r=jyn514

Remove FIXME comment in print_type_sizes ui test suite

## Overview
Helps with rust-lang#62277

> The type sizes are likely only printed when the actual layout is computed. For generic types, this only happens during codegen.

ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Codegen.20process.20question/near/215836807

Some tests like `multiple_types.rs` are passed even if using `check-pass`. But tests should be agnostic to when the actual layout is computed. The `build-pass` is intentionally used for them. I remove FIXME comments.
  • Loading branch information
m-ou-se authored Nov 7, 2020
2 parents b30dff3 + 5c8d25f commit c78a951
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/anonymous.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass

// All of the types that occur in this function are uninteresting, in
// that one cannot control the sizes of these types with the same sort
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/generics.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/multiple_types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass

// This file illustrates that when multiple structural types occur in
// a function, every one of them is included in the output.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/niche-filling.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/no_duplicates.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/packed.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/padding.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass

// This file illustrates how padding is handled: alignment
// requirements can lead to the introduction of padding, either before
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/repr-align.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/repr_int_c.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass

// This test makes sure that the tag is not grown for `repr(C)` or `repr(u8)`
// variants (see https://github.com/rust-lang/rust/issues/50098 for the original bug).
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/uninhabited.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
// FIXME: consider using an attribute instead of side-effects.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/variants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass

// This file illustrates two things:
//
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/print_type_sizes/zero-sized-fields.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: -Z print-type-sizes
// build-pass (FIXME(62277): could be check-pass?)
// build-pass
// ignore-pass

// At one point, zero-sized fields such as those in this file were causing
Expand Down

0 comments on commit c78a951

Please sign in to comment.