forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#65688 - JohnTitor:add-some-tests, r=Dylan-DPC
Add some tests for fixed ICEs Fixes rust-lang#41366 from 1.35.0 Fixes rust-lang#51431 from 1.31.0-nightly (77af314 2018-10-11) (on my local) Fixes rust-lang#52437 from nightly Fixes rust-lang#63496 from nightly r? @Centril
- Loading branch information
Showing
8 changed files
with
103 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ignore-emscripten no asm! support | ||
|
||
#![feature(asm)] | ||
|
||
fn main() { | ||
unsafe { | ||
asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)} | ||
//~^ ERROR: invalid value for constraint in inline assembly | ||
} | ||
} |
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 @@ | ||
error[E0669]: invalid value for constraint in inline assembly | ||
--> $DIR/issue-51431.rs:7:32 | ||
| | ||
LL | asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)} | ||
| ^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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 A { | ||
const C: usize; | ||
|
||
fn f() -> ([u8; A::C], [u8; A::C]); | ||
//~^ ERROR: type annotations needed: cannot resolve | ||
//~| ERROR: type annotations needed: cannot resolve | ||
} | ||
|
||
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,21 @@ | ||
error[E0283]: type annotations needed: cannot resolve `_: A` | ||
--> $DIR/issue-63496.rs:4:21 | ||
| | ||
LL | const C: usize; | ||
| --------------- required by `A::C` | ||
LL | | ||
LL | fn f() -> ([u8; A::C], [u8; A::C]); | ||
| ^^^^ | ||
|
||
error[E0283]: type annotations needed: cannot resolve `_: A` | ||
--> $DIR/issue-63496.rs:4:33 | ||
| | ||
LL | const C: usize; | ||
| --------------- required by `A::C` | ||
LL | | ||
LL | fn f() -> ([u8; A::C], [u8; A::C]); | ||
| ^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0283`. |
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,13 @@ | ||
trait T<'x> { | ||
type V; | ||
} | ||
|
||
impl<'g> T<'g> for u32 { | ||
type V = u16; | ||
} | ||
|
||
fn main() { | ||
(&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V); | ||
//~^ ERROR: type mismatch in closure arguments | ||
//~| ERROR: type mismatch resolving | ||
} |
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,22 @@ | ||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/issue-41366.rs:10:5 | ||
| | ||
LL | (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V); | ||
| ^^-----^ | ||
| | | | ||
| | found signature of `fn(_) -> _` | ||
| expected signature of `for<'x> fn(<u32 as T<'x>>::V) -> _` | ||
| | ||
= note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)` | ||
|
||
error[E0271]: type mismatch resolving `for<'x> <[closure@$DIR/issue-41366.rs:10:7: 10:12] as std::ops::FnOnce<(<u32 as T<'x>>::V,)>>::Output == ()` | ||
--> $DIR/issue-41366.rs:10:5 | ||
| | ||
LL | (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V); | ||
| ^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime | ||
| | ||
= note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0271`. |
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,5 @@ | ||
fn main() { | ||
[(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ||
//~^ ERROR: invalid label name `'static` | ||
//~| ERROR: type annotations needed | ||
} |
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,15 @@ | ||
error: invalid label name `'static` | ||
--> $DIR/issue-52437.rs:2:13 | ||
| | ||
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ||
| ^^^^^^^ | ||
|
||
error[E0282]: type annotations needed | ||
--> $DIR/issue-52437.rs:2:30 | ||
| | ||
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ||
| ^ consider giving this closure parameter a type | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0282`. |