rust/src/test/ui/print_type_sizes
Michael Howell 59abdb6a7e Mark `-1` as an available niche for file descriptors
Based on discussion from https://internals.rust-lang.org/t/can-the-standard-library-shrink-option-file/12768,
the file descriptor -1 is chosen based on the POSIX API designs that use it as a sentinel to report errors.
A bigger niche could've been chosen, particularly on Linux, but would not necessarily be portable.

This PR also adds a test case to ensure that the -1 niche
(which is kind of hacky and has no obvious test case) works correctly.
It requires the "upper" bound, which is actually -1, to be expressed in two's complement.
2020-12-10 13:31:52 -07:00
..
anonymous.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
generics.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
generics.stdout
multiple_types.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
multiple_types.stdout In `-Zprint-type-size` output, sort enum variants by size. 2019-04-12 12:18:23 +10:00
niche-filling.rs Mark `-1` as an available niche for file descriptors 2020-12-10 13:31:52 -07:00
niche-filling.stdout Mark `-1` as an available niche for file descriptors 2020-12-10 13:31:52 -07:00
no_duplicates.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
no_duplicates.stdout
packed.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
packed.stdout
padding.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
padding.stdout In `-Zprint-type-size` output, sort enum variants by size. 2019-04-12 12:18:23 +10:00
repr-align.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
repr-align.stdout In `-Zprint-type-size` output, sort enum variants by size. 2019-04-12 12:18:23 +10:00
repr_int_c.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
repr_int_c.stdout
uninhabited.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
uninhabited.stdout
variants.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
variants.stdout In `-Zprint-type-size` output, sort enum variants by size. 2019-04-12 12:18:23 +10:00
zero-sized-fields.rs remove FIXME comment of #62277 in print_type_sizez ui tests 2020-11-07 21:34:40 +09:00
zero-sized-fields.stdout Fix `-Z print-type-sizes`'s handling of zero-sized fields. 2019-12-11 15:09:19 +11:00