-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #71985 - Dylan-DPC:rollup-9ceqump, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #71938 (Use trait_object_dummy_self instead of err) - #71952 (Add some regression tests) - #71959 (tests: Fix warnings in `rust_test_helpers.c`) - #71962 (Grammar) - #71972 (use hex for pointers in Miri error messages) - #71980 (Allow a few warnings.) Failed merges: r? @ghost
- Loading branch information
Showing
14 changed files
with
134 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Regression test for #29988 | ||
|
||
// compile-flags: -C no-prepopulate-passes | ||
// only-x86_64 | ||
// ignore-windows | ||
|
||
#[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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
enum Bug<S> { | ||
Var = { | ||
let x: S = 0; //~ ERROR: mismatched types | ||
0 | ||
}, | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-67945-1.rs:3:20 | ||
| | ||
LL | enum Bug<S> { | ||
| - 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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![feature(type_ascription)] | ||
|
||
enum Bug<S> { | ||
Var = 0: S, | ||
//~^ ERROR: mismatched types | ||
//~| ERROR: mismatched types | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-67945-2.rs:4:11 | ||
| | ||
LL | enum Bug<S> { | ||
| - 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<S> { | ||
| - 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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |