-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #134506 - oli-obk:push-mrrulszyuslt, r=jieyouxu
Remove a duplicated check that doesn't do anything anymore. fixes #134005 This code didn't actually `lub` the type of the previous expressions, but just the current type over and over again. Changing it to using the actual expression type does not change anything either, so may as well remove the entire loop.
- Loading branch information
Showing
4 changed files
with
18 additions
and
42 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 was deleted.
Oops, something went wrong.
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,6 @@ | ||
//! This test used to hit an assertion instead of erroring and bailing out. | ||
fn main() { | ||
let _ = [std::ops::Add::add, std::ops::Mul::mul, std::ops::Mul::mul as fn(_, &_)]; | ||
//~^ ERROR: mismatched types | ||
} |
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,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/signature-mismatch.rs:4:54 | ||
| | ||
LL | let _ = [std::ops::Add::add, std::ops::Mul::mul, std::ops::Mul::mul as fn(_, &_)]; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | ||
= note: expected fn pointer `fn(_, _) -> _` | ||
found fn pointer `for<'a> fn(_, &'a _) -> ()` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |