Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0e0bcd9
prevent uninitialized access in black_box for zero-sized-types
krasimirgg Nov 4, 2022
3074678
Mark `trait_upcasting` feature no longer incomplete.
crlf0710 Nov 7, 2022
312d6b8
Don't emit coerce suggestions for a type into itself
compiler-errors Nov 10, 2022
55f1f99
More accurately report error when formal and expected signature types…
compiler-errors Nov 10, 2022
d85b614
Add a reference to ilog2 in leading_zeros integer docs
albertlarsan68 Nov 10, 2022
c467006
suggest removing unnecessary . to use a floating point literal
TaKO8Ki Nov 8, 2022
004986b
avoid unnecessary `format!`
TaKO8Ki Nov 8, 2022
6018f11
emit errors when using `RangeFrom` and `RangeTo`
TaKO8Ki Nov 9, 2022
fb98796
Apply suggestions
albertlarsan68 Nov 11, 2022
a1909b7
Try another way
albertlarsan68 Nov 11, 2022
fed1053
Remove the old `ValidAlign` name
scottmcm Nov 12, 2022
18c4fa6
Migrate no result page link color to CSS variables
GuillaumeGomez Nov 10, 2022
7e79619
Add GUI test for "no result found" links
GuillaumeGomez Nov 10, 2022
ee73812
Use same color for links in no result search
GuillaumeGomez Nov 11, 2022
35c3ca2
Fix impossibility to click on source link
GuillaumeGomez Nov 12, 2022
c645d3e
Add GUI test to ensure that source links can be clicked
GuillaumeGomez Nov 12, 2022
3b91f01
Rollup merge of #104110 - krasimirgg:msan-16, r=nagisa
GuillaumeGomez Nov 12, 2022
c655cbf
Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726
GuillaumeGomez Nov 12, 2022
02ef4f2
Rollup merge of #104144 - TaKO8Ki:suggest-removing-unnecessary-dot, r…
GuillaumeGomez Nov 12, 2022
561007a
Rollup merge of #104250 - GuillaumeGomez:migrate-not-found-link-color…
GuillaumeGomez Nov 12, 2022
c2389a1
Rollup merge of #104261 - compiler-errors:formal-and-expected-differ,…
GuillaumeGomez Nov 12, 2022
338ca5c
Rollup merge of #104263 - albertlarsan68:add-ilog2-to-leading-zeroes-…
GuillaumeGomez Nov 12, 2022
ac21592
Rollup merge of #104308 - scottmcm:no-more-validalign, r=thomcc
GuillaumeGomez Nov 12, 2022
669155c
Rollup merge of #104319 - GuillaumeGomez:fix-non-clickable-source-lin…
GuillaumeGomez Nov 12, 2022
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
Prev Previous commit
Next Next commit
Don't emit coerce suggestions for a type into itself
  • Loading branch information
compiler-errors committed Nov 10, 2022
commit 312d6b8e9afce578fd5bd89b3c73153fe0be7539
4 changes: 4 additions & 0 deletions compiler/rustc_hir_typeck/src/demand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
expected_ty_expr: Option<&'tcx hir::Expr<'tcx>>,
error: Option<TypeError<'tcx>>,
) {
if expr_ty == expected {
return;
}

self.annotate_expected_due_to_let_ty(err, expr, error);

// Use `||` to give these suggestions a precedence
Expand Down