Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dec7fc3
Fix an ICE caused by type mismatch errors being ignored
theo-lw Aug 29, 2021
2ab73cf
add benchmark for From<[T; N]> in VecDeque
xu-cheng Aug 29, 2021
c3cff0a
VecDeque: improve performance for From<[T; N]>
xu-cheng Aug 29, 2021
09d55d5
Remove special checks to is_assign_to_bool
theo-lw Sep 17, 2021
35b0015
Improve wording of `map_or_else` docs
Nitepone Sep 30, 2021
7ed75ce
Recommend running `cargo clean` in E0514 output
pierwill Sep 30, 2021
2c6e671
implement advance_(back_)_by on more iterators
the8472 Jul 12, 2021
6654a0b
from review: code style
the8472 Jul 13, 2021
ffd7ade
fix issues pointed out in review
the8472 Jul 13, 2021
0f9f241
[aarch64] add target feature outline-atomics
Apr 5, 2021
d6fde80
Include the length in BTree hashes
cuviper Oct 1, 2021
d92c683
Improve error message for missing angle brackets in `[_]::method`
FabianWolff Oct 1, 2021
277a018
rustdoc: use slice::contains instead of open-coding it
notriddle Oct 1, 2021
058a21d
Consistently use 'supertrait'.
waywardmonkeys Oct 2, 2021
3818981
Practice diagnostic message convention
hkmatsumoto Oct 3, 2021
a28a78f
Fix ICE with buffered lint referring to AST node deleted by everybody…
FabianWolff Oct 3, 2021
bce8621
Stabilize `const_panic`
jhpratt Oct 4, 2021
4e9cf04
Rollup merge of #83655 - sebpop:arm64-outline-atomics, r=workingjubilee
workingjubilee Oct 4, 2021
ca8a108
Rollup merge of #87091 - the8472:more-advance-by-impls, r=joshtriplett
workingjubilee Oct 4, 2021
a2c6075
Rollup merge of #88451 - theo-lw:issue-87771, r=jackh726
workingjubilee Oct 4, 2021
19d9a14
Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-se
workingjubilee Oct 4, 2021
9e387cf
Rollup merge of #89400 - Nitepone:nitepone/map-or-else-docfix, r=dtolnay
workingjubilee Oct 4, 2021
9381d7a
Rollup merge of #89407 - pierwill:recommend-clean-E0514, r=davidtwco
workingjubilee Oct 4, 2021
e1478d6
Rollup merge of #89443 - cuviper:btree-hash-len, r=dtolnay
workingjubilee Oct 4, 2021
b115a16
Rollup merge of #89444 - notriddle:notriddle/contains-str, r=jyn514
workingjubilee Oct 4, 2021
08dd414
Rollup merge of #89447 - FabianWolff:issue-89388, r=davidtwco
workingjubilee Oct 4, 2021
2bc89ce
Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, …
workingjubilee Oct 4, 2021
5352e17
Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank
workingjubilee Oct 4, 2021
3d4467d
Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov
workingjubilee Oct 4, 2021
9866b09
Rollup merge of #89508 - jhpratt:stabilize-const_panic, r=joshtriplett
workingjubilee Oct 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix an ICE caused by type mismatch errors being ignored
  • Loading branch information
theo-lw authored and tlwang committed Aug 29, 2021
commit dec7fc3ced5bc3c18d0e5d29921d087f93189cb8
6 changes: 0 additions & 6 deletions compiler/rustc_typeck/src/check/demand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let expr_ty = self.resolve_vars_with_obligations(checked_ty);
let mut err = self.report_mismatched_types(&cause, expected, expr_ty, e);

if self.is_assign_to_bool(expr, expected) {
// Error reported in `check_assign` so avoid emitting error again.
err.delay_as_bug();
return (expected, None);
}

self.emit_coerce_suggestions(&mut err, expr, expr_ty, expected, expected_ty_expr);

(expected, Some(err))
Expand Down
4 changes: 4 additions & 0 deletions src/test/ui/typeck/issue-87771-ice-assign-assign-to-bool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
let mut a;
a = a = true; //~ ERROR mismatched types
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0308]: mismatched types
--> $DIR/issue-87771-ice-assign-assign-to-bool.rs:3:9
|
LL | a = a = true;
| ^^^^^^^^ expected `bool`, found `()`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.