Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 3, 2020
1 parent 74b7ed7 commit de3b4d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/librustc_middle/ty/error.rs
Expand Up @@ -698,7 +698,9 @@ impl<T> Trait<T> for X {
suggested |=
self.suggest_constraint(db, &msg, body_owner_def_id, proj_ty, values.found);
}
if let (Some(hir_id), false) = (self.hir().as_local_hir_id(body_owner_def_id), suggested) {
if let (Some(hir_id), false) =
(body_owner_def_id.as_local().map(|id| self.hir().as_local_hir_id(id)), suggested)
{
// When `body_owner` is an `impl` or `trait` item, look in its associated types for
// `expected` and point at it.
let parent_id = self.hir().get_parent_item(hir_id);
Expand Down
Expand Up @@ -38,8 +38,6 @@ LL | Pin::new(x)
|
= note: expected struct `std::boxed::Box<dyn std::future::Future<Output = i32> + std::marker::Send>`
found type parameter `F`
= help: type parameters must be constrained to match other types
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
= note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html

error[E0277]: `dyn std::future::Future<Output = i32> + std::marker::Send` cannot be unpinned
Expand Down

0 comments on commit de3b4d4

Please sign in to comment.