diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-04-10 18:15:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-10 18:15:16 +0200 |
| commit | 1fe86f47d82263404d088e4fd2f406d056f8babc (patch) | |
| tree | 9080ec801592c01e0e40ca1b0b1b14fc3983507c /src/test/ui/impl-trait | |
| parent | dbc3cfdd25ccd56edf3ea364f86ab32967636c26 (diff) | |
| parent | d605a9d9695955324760194f18ec46e7f7824105 (diff) | |
Rollup merge of #69745 - estebank:predicate-obligations-3, r=nikomatsakis,eddyb
Use `PredicateObligation`s instead of `Predicate`s Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations. Subset of #69709. r? @eddyb
Diffstat (limited to 'src/test/ui/impl-trait')
| -rw-r--r-- | src/test/ui/impl-trait/auto-trait-leak.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/auto-trait-leak2.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index 3d60cbff320..164524be1bc 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -258,7 +258,7 @@ error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads --> $DIR/auto-trait-leak.rs:16:5 | LL | fn send<T: Send>(_: T) {} - | ---- ---- required by this bound in `send` + | ---- required by this bound in `send` ... LL | send(cycle2().clone()); | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely diff --git a/src/test/ui/impl-trait/auto-trait-leak2.stderr b/src/test/ui/impl-trait/auto-trait-leak2.stderr index a93b3dbc71b..b02ef7d4a5b 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak2.stderr @@ -5,7 +5,7 @@ LL | fn before() -> impl Fn(i32) { | ------------ within this `impl std::ops::Fn<(i32,)>` ... LL | fn send<T: Send>(_: T) {} - | ---- ---- required by this bound in `send` + | ---- required by this bound in `send` ... LL | send(before()); | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely @@ -18,7 +18,7 @@ error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads --> $DIR/auto-trait-leak2.rs:16:5 | LL | fn send<T: Send>(_: T) {} - | ---- ---- required by this bound in `send` + | ---- required by this bound in `send` ... LL | send(after()); | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely |
