-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #71810 - estebank:issue-71798, r=davidtwco
Do not try to find binop method on RHS `TyErr` Fix #71798.
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { | ||
*x //~^ ERROR the trait bound `u32: std::future::Future` is not satisfied | ||
} | ||
|
||
fn main() { | ||
let _ = test_ref & u; //~ ERROR cannot find value `u` in this scope | ||
} |
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,20 @@ | ||
error[E0425]: cannot find value `u` in this scope | ||
--> $DIR/issues-71798.rs:6:24 | ||
| | ||
LL | let _ = test_ref & u; | ||
| ^ not found in this scope | ||
|
||
error[E0277]: the trait bound `u32: std::future::Future` is not satisfied | ||
--> $DIR/issues-71798.rs:1:25 | ||
| | ||
LL | fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `u32` | ||
LL | *x | ||
| -- this returned value is of type `u32` | ||
| | ||
= note: the return type of a function must have a statically known size | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0277, E0425. | ||
For more information about an error, try `rustc --explain E0277`. |