From 9ed9200be4e56f159fdcb4c00759290eaaa55fa1 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 5 May 2020 21:32:08 -0500 Subject: [PATCH 01/16] use trait_object_dummy_self instead of err --- src/librustc_typeck/check/closure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_typeck/check/closure.rs b/src/librustc_typeck/check/closure.rs index 1acbcc038891d..035e5880dc522 100644 --- a/src/librustc_typeck/check/closure.rs +++ b/src/librustc_typeck/check/closure.rs @@ -178,7 +178,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { match expected_ty.kind { ty::Dynamic(ref object_type, ..) => { let sig = object_type.projection_bounds().find_map(|pb| { - let pb = pb.with_self_ty(self.tcx, self.tcx.types.err); + let pb = pb.with_self_ty(self.tcx, self.tcx.types.trait_object_dummy_self); self.deduce_sig_from_projection(None, &pb) }); let kind = object_type From 96d4e0bab23e1c0874af07cf0afcf3cec7e1cd0f Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 7 May 2020 02:13:20 +0900 Subject: [PATCH 02/16] Add test for #29988 --- src/test/codegen/ffi-out-of-bounds-loads.rs | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/codegen/ffi-out-of-bounds-loads.rs diff --git a/src/test/codegen/ffi-out-of-bounds-loads.rs b/src/test/codegen/ffi-out-of-bounds-loads.rs new file mode 100644 index 0000000000000..a58d75389f5e2 --- /dev/null +++ b/src/test/codegen/ffi-out-of-bounds-loads.rs @@ -0,0 +1,22 @@ +// compile-flags: -C no-prepopulate-passes +// Regression test for #29988 + +#[repr(C)] +struct S { + f1: i32, + f2: i32, + f3: i32, +} + +extern { + fn foo(s: S); +} + +fn main() { + let s = S { f1: 1, f2: 2, f3: 3 }; + unsafe { + // CHECK: load { i64, i32 }, { i64, i32 }* {{.*}}, align 4 + // CHECK: call void @foo({ i64, i32 } {{.*}}) + foo(s); + } +} From be2d5535ead0dbd9d188f8f3e5d9bd4918b6153a Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 7 May 2020 02:13:51 +0900 Subject: [PATCH 03/16] Add test for #34979 --- src/test/ui/lifetimes/issue-34979.rs | 9 +++++++++ src/test/ui/lifetimes/issue-34979.stderr | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/test/ui/lifetimes/issue-34979.rs create mode 100644 src/test/ui/lifetimes/issue-34979.stderr diff --git a/src/test/ui/lifetimes/issue-34979.rs b/src/test/ui/lifetimes/issue-34979.rs new file mode 100644 index 0000000000000..252486dd92192 --- /dev/null +++ b/src/test/ui/lifetimes/issue-34979.rs @@ -0,0 +1,9 @@ +trait Foo {} +impl<'a, T> Foo for &'a T {} + +struct Ctx<'a>(&'a ()) +where + &'a (): Foo, //~ ERROR: type annotations needed + &'static (): Foo; + +fn main() {} diff --git a/src/test/ui/lifetimes/issue-34979.stderr b/src/test/ui/lifetimes/issue-34979.stderr new file mode 100644 index 0000000000000..04ad0d1276647 --- /dev/null +++ b/src/test/ui/lifetimes/issue-34979.stderr @@ -0,0 +1,14 @@ +error[E0283]: type annotations needed + --> $DIR/issue-34979.rs:6:13 + | +LL | trait Foo {} + | --------- required by this bound in `Foo` +... +LL | &'a (): Foo, + | ^^^ cannot infer type for reference `&'a ()` + | + = note: cannot satisfy `&'a (): Foo` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0283`. From f22bc7b1cf485666404938bc87a6267258a6d42f Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 7 May 2020 02:14:05 +0900 Subject: [PATCH 04/16] Add some tests for #67945 --- src/test/ui/enum/issue-67945-1.rs | 8 ++++++++ src/test/ui/enum/issue-67945-1.stderr | 17 +++++++++++++++++ src/test/ui/enum/issue-67945-2.rs | 9 +++++++++ src/test/ui/enum/issue-67945-2.stderr | 25 +++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 src/test/ui/enum/issue-67945-1.rs create mode 100644 src/test/ui/enum/issue-67945-1.stderr create mode 100644 src/test/ui/enum/issue-67945-2.rs create mode 100644 src/test/ui/enum/issue-67945-2.stderr diff --git a/src/test/ui/enum/issue-67945-1.rs b/src/test/ui/enum/issue-67945-1.rs new file mode 100644 index 0000000000000..7977bddae7bcb --- /dev/null +++ b/src/test/ui/enum/issue-67945-1.rs @@ -0,0 +1,8 @@ +enum Bug { + Var = { + let x: S = 0; //~ ERROR: mismatched types + 0 + }, +} + +fn main() {} diff --git a/src/test/ui/enum/issue-67945-1.stderr b/src/test/ui/enum/issue-67945-1.stderr new file mode 100644 index 0000000000000..6583fe13d0c63 --- /dev/null +++ b/src/test/ui/enum/issue-67945-1.stderr @@ -0,0 +1,17 @@ +error[E0308]: mismatched types + --> $DIR/issue-67945-1.rs:3:20 + | +LL | enum Bug { + | - this type parameter +LL | Var = { +LL | let x: S = 0; + | - ^ expected type parameter `S`, found integer + | | + | expected due to this + | + = note: expected type parameter `S` + found type `{integer}` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/enum/issue-67945-2.rs b/src/test/ui/enum/issue-67945-2.rs new file mode 100644 index 0000000000000..16bd8530ab38c --- /dev/null +++ b/src/test/ui/enum/issue-67945-2.rs @@ -0,0 +1,9 @@ +#![feature(type_ascription)] + +enum Bug { + Var = 0: S, + //~^ ERROR: mismatched types + //~| ERROR: mismatched types +} + +fn main() {} diff --git a/src/test/ui/enum/issue-67945-2.stderr b/src/test/ui/enum/issue-67945-2.stderr new file mode 100644 index 0000000000000..c40506d59edd9 --- /dev/null +++ b/src/test/ui/enum/issue-67945-2.stderr @@ -0,0 +1,25 @@ +error[E0308]: mismatched types + --> $DIR/issue-67945-2.rs:4:11 + | +LL | enum Bug { + | - this type parameter +LL | Var = 0: S, + | ^ expected type parameter `S`, found integer + | + = note: expected type parameter `S` + found type `{integer}` + +error[E0308]: mismatched types + --> $DIR/issue-67945-2.rs:4:11 + | +LL | enum Bug { + | - this type parameter +LL | Var = 0: S, + | ^^^^ expected `isize`, found type parameter `S` + | + = note: expected type `isize` + found type parameter `S` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. From 8e76663ed1983c4182a6e6a09dbc9c085ee56bd5 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Wed, 6 May 2020 23:53:55 +0300 Subject: [PATCH 05/16] test: Fix warnings in `rust_test_helpers.c` --- src/test/auxiliary/rust_test_helpers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/auxiliary/rust_test_helpers.c b/src/test/auxiliary/rust_test_helpers.c index 897c940149b0a..92b7dd4b7c516 100644 --- a/src/test/auxiliary/rust_test_helpers.c +++ b/src/test/auxiliary/rust_test_helpers.c @@ -368,6 +368,7 @@ rust_dbg_unpack_option_u64(struct U8TaggedEnumOptionU64 o, uint64_t *into) { return 0; default: assert(0 && "unexpected tag"); + return 0; } } @@ -411,5 +412,6 @@ rust_dbg_unpack_option_u64u64(struct U8TaggedEnumOptionU64U64 o, uint64_t *a, ui return 0; default: assert(0 && "unexpected tag"); + return 0; } } From 642541307fcf3773cfdae99db07d51d0436b6360 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 18:56:25 -0400 Subject: [PATCH 06/16] grammar: which vs that --- src/liballoc/fmt.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 13ef2f063f95f..959bbeb12d94a 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -50,8 +50,8 @@ //! The internal iterator over the argument has not been advanced by the time //! the first `{}` is seen, so it prints the first argument. Then upon reaching //! the second `{}`, the iterator has advanced forward to the second argument. -//! Essentially, parameters which explicitly name their argument do not affect -//! parameters which do not name an argument in terms of positional specifiers. +//! Essentially, parameters that explicitly name their argument do not affect +//! parameters that do not name an argument in terms of positional specifiers. //! //! A format string is required to use all of its arguments, otherwise it is a //! compile-time error. You may refer to the same argument more than once in the @@ -60,7 +60,7 @@ //! ## Named parameters //! //! Rust itself does not have a Python-like equivalent of named parameters to a -//! function, but the [`format!`] macro is a syntax extension which allows it to +//! function, but the [`format!`] macro is a syntax extension that allows it to //! leverage named parameters. Named parameters are listed at the end of the //! argument list and have the syntax: //! @@ -77,7 +77,7 @@ //! ``` //! //! It is not valid to put positional parameters (those without names) after -//! arguments which have names. Like with positional parameters, it is not +//! arguments that have names. Like with positional parameters, it is not //! valid to provide named parameters that are unused by the format string. //! //! # Formatting Parameters From 39b5b7000a587ad3d36d9af15bafb8c900f10f73 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 18:58:12 -0400 Subject: [PATCH 07/16] grammar: count-agreement default ... is --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 959bbeb12d94a..9a4e9f4d26f79 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -130,7 +130,7 @@ //! //! The default [fill/alignment](#fillalignment) for non-numerics is a space and //! left-aligned. The -//! defaults for numeric formatters is also a space but with right-alignment. If +//! default for numeric formatters is also a space but with right-alignment. If //! the `0` flag (see below) is specified for numerics, then the implicit fill character is //! `0`. //! From 5f54ce7ec9dd768cd7378de47442831b1d2bb998 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 18:58:45 -0400 Subject: [PATCH 08/16] grammar: disambiguate space-character --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 9a4e9f4d26f79..b9da68e031bbb 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -130,7 +130,7 @@ //! //! The default [fill/alignment](#fillalignment) for non-numerics is a space and //! left-aligned. The -//! default for numeric formatters is also a space but with right-alignment. If +//! default for numeric formatters is also a space character but with right-alignment. If //! the `0` flag (see below) is specified for numerics, then the implicit fill character is //! `0`. //! From c8aba78613886a29a758cc618f642fd9736cd862 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 18:59:52 -0400 Subject: [PATCH 09/16] grammar: subject-verb not subject-verb-verb --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index b9da68e031bbb..e43def2ac3d15 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -161,7 +161,7 @@ //! `Signed` trait. This flag indicates that the correct sign (`+` or `-`) //! should always be printed. //! * `-` - Currently not used -//! * `#` - This flag is indicates that the "alternate" form of printing should +//! * `#` - This flag indicates that the "alternate" form of printing should //! be used. The alternate forms are: //! * `#?` - pretty-print the [`Debug`] formatting //! * `#x` - precedes the argument with a `0x` From 488e660728eb8f97650a85c12ffbfe61b7b20a6b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 19:00:15 -0400 Subject: [PATCH 10/16] grammar: noun not verb --- src/liballoc/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index e43def2ac3d15..9c8e124d70a48 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -173,9 +173,9 @@ //! like `{:08}` would yield `00000001` for the integer `1`, while the //! same format would yield `-0000001` for the integer `-1`. Notice that //! the negative version has one fewer zero than the positive version. -//! Note that padding zeroes are always placed after the sign (if any) +//! Note that padding zeros are always placed after the sign (if any) //! and before the digits. When used together with the `#` flag, a similar -//! rule applies: padding zeroes are inserted after the prefix but before +//! rule applies: padding zeros are inserted after the prefix but before //! the digits. The prefix is included in the total width. //! //! ## Precision From 5d2d7e7725adb3b9e92037e4b90f7d5436223abe Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 19:00:40 -0400 Subject: [PATCH 11/16] grammar: stray comma --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 9c8e124d70a48..a942031389043 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -251,7 +251,7 @@ //! //! In some programming languages, the behavior of string formatting functions //! depends on the operating system's locale setting. The format functions -//! provided by Rust's standard library do not have any concept of locale, and +//! provided by Rust's standard library do not have any concept of locale and //! will produce the same results on all systems regardless of user //! configuration. //! From eb12784dc443df1f85086be9b352264d84524de0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 19:01:05 -0400 Subject: [PATCH 12/16] grammar: simplify to avoid that --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index a942031389043..8d7d74ff4aaeb 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -470,7 +470,7 @@ //! //! ### `format_args!` //! -//! This is a curious macro which is used to safely pass around +//! This is a curious macro used to safely pass around //! an opaque object describing the format string. This object //! does not require any heap allocations to create, and it only //! references information on the stack. Under the hood, all of From 6c8c3f8ac41e067ab718f0cfda20256a3a680816 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 6 May 2020 19:01:27 -0400 Subject: [PATCH 13/16] grammar: dealing-with --- src/liballoc/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 8d7d74ff4aaeb..26077f3c8d150 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -495,7 +495,7 @@ //! This structure can then be passed to the [`write`] and [`format`] functions //! inside this module in order to process the format string. //! The goal of this macro is to even further prevent intermediate allocations -//! when dealing formatting strings. +//! when dealing with formatting strings. //! //! For example, a logging library could use the standard formatting syntax, but //! it would internally pass around this structure until it has been determined From d1ea287febf5ea99551543ebd8cb26124e94280f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 7 May 2020 08:57:40 +0200 Subject: [PATCH 14/16] use hex for pointers in Miri error messages; refine vtable error message --- src/librustc_mir/interpret/validity.rs | 7 ++++--- src/test/ui/consts/const-eval/ub-wide-ptr.stderr | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 9f2e79bbee31e..eb743675d91d3 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -321,11 +321,12 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' try_validation!( self.ecx.read_drop_type_from_vtable(vtable), self.path, - err_ub!(InvalidDropFn(..)) | err_ub!(DanglingIntPointer(..)) | err_ub!(InvalidFunctionPointer(..)) | err_unsup!(ReadBytesAsPointer) => - { "invalid drop function pointer in vtable" }, + { "invalid drop function pointer in vtable (not pointing to a function)" }, + err_ub!(InvalidDropFn(..)) => + { "invalid drop function pointer in vtable (function has incompatible signature)" }, ); try_validation!( self.ecx.read_size_and_align_from_vtable(vtable), @@ -400,7 +401,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' err_ub!(DanglingIntPointer(0, _)) => { "a NULL {}", kind }, err_ub!(DanglingIntPointer(i, _)) => - { "a dangling {} (address {} is unallocated)", kind, i }, + { "a dangling {} (address 0x{:x} is unallocated)", kind, i }, err_ub!(PointerOutOfBounds { .. }) => { "a dangling {} (going beyond the bounds of its allocation)", kind }, err_unsup!(ReadBytesAsPointer) => diff --git a/src/test/ui/consts/const-eval/ub-wide-ptr.stderr b/src/test/ui/consts/const-eval/ub-wide-ptr.stderr index 94ca60596d61b..063ea81036b69 100644 --- a/src/test/ui/consts/const-eval/ub-wide-ptr.stderr +++ b/src/test/ui/consts/const-eval/ub-wide-ptr.stderr @@ -170,7 +170,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-wide-ptr.rs:109:1 | LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable (not pointing to a function) | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. @@ -178,7 +178,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-wide-ptr.rs:111:1 | LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable (not pointing to a function) | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. @@ -186,7 +186,7 @@ error[E0080]: it is undefined behavior to use this value --> $DIR/ub-wide-ptr.rs:113:1 | LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: &dyn Trait = unsafe { mem::transmute((&92u8, &[&42u8; 8])) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered invalid drop function pointer in vtable (not pointing to a function) | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. From d14f000ccc5104de1aecceabc97f2934caec1144 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 7 May 2020 07:23:06 -0500 Subject: [PATCH 15/16] Allow a few warnings. On Windows, these types were causing warnings to be emitted during the build. These types are allowed to not have idiomatic names, so the warning should be supressed. --- src/libstd/sys/unix/ext/net.rs | 1 + src/libstd/sys/unix/ext/raw.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index bfdc39ada75eb..32c2ac43129bf 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -7,6 +7,7 @@ use libc; // FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here? #[cfg(not(unix))] +#[allow(non_camel_case_types)] mod libc { pub use libc::c_int; pub type socklen_t = u32; diff --git a/src/libstd/sys/unix/ext/raw.rs b/src/libstd/sys/unix/ext/raw.rs index d81368a18b452..40fa53d484f84 100644 --- a/src/libstd/sys/unix/ext/raw.rs +++ b/src/libstd/sys/unix/ext/raw.rs @@ -11,10 +11,15 @@ #![allow(deprecated)] #[stable(feature = "raw_ext", since = "1.1.0")] +#[allow(non_camel_case_types)] pub type uid_t = u32; + #[stable(feature = "raw_ext", since = "1.1.0")] +#[allow(non_camel_case_types)] pub type gid_t = u32; + #[stable(feature = "raw_ext", since = "1.1.0")] +#[allow(non_camel_case_types)] pub type pid_t = i32; #[doc(inline)] From d717e55f19bb508279ce65ade826fd66be13a6e3 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Fri, 8 May 2020 00:51:13 +0900 Subject: [PATCH 16/16] Add some skip flags --- src/test/codegen/ffi-out-of-bounds-loads.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/codegen/ffi-out-of-bounds-loads.rs b/src/test/codegen/ffi-out-of-bounds-loads.rs index a58d75389f5e2..139a06ab53d05 100644 --- a/src/test/codegen/ffi-out-of-bounds-loads.rs +++ b/src/test/codegen/ffi-out-of-bounds-loads.rs @@ -1,6 +1,9 @@ -// compile-flags: -C no-prepopulate-passes // Regression test for #29988 +// compile-flags: -C no-prepopulate-passes +// only-x86_64 +// ignore-windows + #[repr(C)] struct S { f1: i32,