forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 3
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 rust-lang#88266 - nikomatsakis:issue-87879, r=jackh726
resolve type variables after checking casts r? `@jackh726` Fixes rust-lang#87814 Fixes rust-lang#88118 Supercedes rust-lang#87879 (cc `@ldm0)`
- Loading branch information
Showing
11 changed files
with
69 additions
and
8 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
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,15 @@ | ||
// Regression test for #88118. Used to ICE. | ||
// | ||
// check-pass | ||
|
||
#![allow(incomplete_features)] | ||
#![feature(capture_disjoint_fields)] | ||
|
||
fn foo<MsU>(handler: impl FnOnce() -> MsU + Clone + 'static) { | ||
Box::new(move |value| { | ||
(|_| handler.clone()())(value); | ||
None | ||
}) as Box<dyn Fn(i32) -> Option<i32>>; | ||
} | ||
|
||
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,8 @@ | ||
// check-pass | ||
fn main() { | ||
let mut schema_all = vec![]; | ||
(0..42).for_each(|_x| match Err(()) as Result<(), _> { | ||
Ok(()) => schema_all.push(()), | ||
Err(_) => (), | ||
}); | ||
} |
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,11 @@ | ||
// check-pass | ||
#![feature(try_reserve)] | ||
|
||
fn main() { | ||
let mut schema_all: (Vec<String>, Vec<String>) = (vec![], vec![]); | ||
|
||
let _c = || match schema_all.0.try_reserve(1) as Result<(), _> { | ||
Ok(()) => (), | ||
Err(_) => (), | ||
}; | ||
} |