diff options
| author | bors <bors@rust-lang.org> | 2017-10-11 16:00:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-11 16:00:25 +0000 |
| commit | cbf5d39cca2e837c7a9880e69e110e714d19c6aa (patch) | |
| tree | f3728479cabecb1caf34be67121afd3c91b3eb5b /src/libstd/sys/unix/stack_overflow.rs | |
| parent | c0d40a1908723a7bbf0d2f745570162de250f188 (diff) | |
| parent | 84cb90f8ee080ed04512620357c1f734146df8c3 (diff) | |
| download | rust-cbf5d39cca2e837c7a9880e69e110e714d19c6aa.tar.gz rust-cbf5d39cca2e837c7a9880e69e110e714d19c6aa.zip | |
Auto merge of #44888 - tirr-c:binder-hr-region, r=arielb1
Refactor fmt::Display and fmt::Debug impls in ppaux
Also fixes #44887.
There was a problem that unnamed late-bound regions are *always* named `'r` while they are displayed using `std::fmt::Display`.
---
```rust
fn main() {
f(|_: (), _: ()| {});
}
fn f<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
```
Before (incorrectly shadows lifetime, `for<'r>` omitted for the second argument):
```
error[E0631]: type mismatch in closure arguments
--> test.rs:2:5
|
2 | f(|_: (), _: ()| {});
| ^ ----------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), fn(&'r ())) -> _`
|
= note: required by `f`
```
After:
```
error[E0631]: type mismatch in closure arguments
--> test.rs:2:5
|
2 | f(|_: (), _: ()| {});
| ^ ----------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
|
= note: required by `f`
```
r? @nikomatsakis
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
