forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store a copy of the Issue32230 info within TypeError
The data can't be looked up from the region variable directly, because the region variable might have been destroyed at the end of a snapshot. Fixes rust-lang#40000. Fixes rust-lang#40743.
- Loading branch information
1 parent
361cf44
commit 04f0c80
Showing
5 changed files
with
69 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
#![feature(closure_to_fn_coercion)] | ||
|
||
fn main() { | ||
let bar: fn(&mut u32) = |_| {}; //~ ERROR mismatched types | ||
//~| expected concrete lifetime, found bound lifetime parameter | ||
|
||
fn foo(x: Box<Fn(&i32)>) {} | ||
let bar = Box::new(|x: &i32| {}) as Box<Fn(_)>; | ||
foo(bar); //~ ERROR mismatched types | ||
//~| expected concrete lifetime, found bound lifetime parameter | ||
} |