Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bd13567
Allow setting up git hooks from other worktrees
jyn514 Oct 10, 2020
0ec3ea9
const keyword: brief paragraph on 'const fn'
RalfJung Oct 11, 2020
c8405d2
fix markdown reference
RalfJung Oct 12, 2020
058699d
[net] clippy: needless_update
wcampbell0x2a Oct 13, 2020
e6dc604
[net] clippy: match_like_matches_macro
wcampbell0x2a Oct 13, 2020
7a75f44
[net] clippy: identity_op
wcampbell0x2a Oct 13, 2020
39867f3
Fixed false positive for `unused_parens` lint
aticu Oct 13, 2020
7da0e58
use matches! in library/std/src/net/ip.rs
wcampbell0x2a Oct 13, 2020
ce04836
fmt
wcampbell0x2a Oct 14, 2020
608f260
Rename some RFC dirs to be sorted alphabetically
JohnTitor Oct 15, 2020
d87c17d
Migrate from `associated-const` to `associated-consts`
JohnTitor Oct 15, 2020
3113c07
Migrate from `associated-type` to `associated-types`
JohnTitor Oct 15, 2020
72b3807
Clarify the `mod` dir name not to make confusion with the `modules`
JohnTitor Oct 15, 2020
3156310
Migrate from `generic` to `generics`
JohnTitor Oct 15, 2020
488b999
BTreeMap: test invariants more thoroughly and more readably
ssomers Oct 5, 2020
736c27e
Revert "[net] clippy: needless_update"
wcampbell0x2a Oct 19, 2020
34c80aa
change name in mailmap
lcnr Oct 19, 2020
71ca239
don't assume trait ambiguity happens in `Self`
SNCPlay42 Oct 19, 2020
c146e8c
revert workaround #73027
SNCPlay42 Oct 19, 2020
66ac5a2
Do not ICE on pattern that uses a binding multiple times in generator
LeSeulArtichaut Oct 19, 2020
334c6c5
Add regression test
LeSeulArtichaut Oct 19, 2020
21c29b1
Check that pthread mutex initialization succeeded
tmiasko Oct 20, 2020
c5b0a88
Rollup merge of #77612 - ssomers:btree_cleanup_2, r=Mark-Simulacrum
JohnTitor Oct 20, 2020
b09ef11
Rollup merge of #77761 - tmiasko:pthread-mutex, r=cuviper
JohnTitor Oct 20, 2020
24907f3
Rollup merge of #77778 - jyn514:git-hook, r=mark-simulacrum
JohnTitor Oct 20, 2020
f9db008
Rollup merge of #77838 - RalfJung:const-fn, r=kennytm
JohnTitor Oct 20, 2020
6df79bf
Rollup merge of #77923 - wcampbell0x2a:cleanup-net-module, r=scottmcm
JohnTitor Oct 20, 2020
378ca5e
Rollup merge of #77931 - aticu:fix_60336, r=petrochenkov
JohnTitor Oct 20, 2020
587cf84
Rollup merge of #77959 - JohnTitor:tweak-test-structure, r=petrochenkov
JohnTitor Oct 20, 2020
aebeec7
Rollup merge of #78105 - lcnr:namesNstuff, r=Mark-Simulacrum
JohnTitor Oct 20, 2020
3f1c637
Rollup merge of #78111 - SNCPlay42:not-always-self, r=lcnr
JohnTitor Oct 20, 2020
21df410
Rollup merge of #78121 - LeSeulArtichaut:issue-78115, r=tmandry
JohnTitor Oct 20, 2020
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
revert workaround #73027
  • Loading branch information
SNCPlay42 committed Oct 19, 2020
commit c146e8c54fa0b99defd1ba77ad4d6505c491f4f3
17 changes: 2 additions & 15 deletions compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ impl<'a, 'tcx> Visitor<'tcx> for FindHirNodeVisitor<'a, 'tcx> {
if let (None, Some(ty)) =
(self.found_local_pattern, self.node_ty_contains_target(local.hir_id))
{
// FIXME: There's a trade-off here - we can either check that our target span
// is contained in `local.span` or not. If we choose to check containment
// we can avoid some spurious suggestions (see #72690), but we lose
// the ability to report on things like:
//
// ```
// let x = vec![];
// ```
//
// because the target span will be in the macro expansion of `vec![]`.
// At present we choose not to check containment.
self.found_local_pattern = Some(&*local.pat);
self.found_node_ty = Some(ty);
}
Expand All @@ -113,10 +102,8 @@ impl<'a, 'tcx> Visitor<'tcx> for FindHirNodeVisitor<'a, 'tcx> {
if let (None, Some(ty)) =
(self.found_arg_pattern, self.node_ty_contains_target(param.hir_id))
{
if self.target_span.contains(param.pat.span) {
self.found_arg_pattern = Some(&*param.pat);
self.found_node_ty = Some(ty);
}
self.found_arg_pattern = Some(&*param.pat);
self.found_node_ty = Some(ty);
}
}
intravisit::walk_body(self, body);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0282]: type annotations needed
--> $DIR/expect-two-infer-vars-supply-ty-with-bound-region.rs:8:5
--> $DIR/expect-two-infer-vars-supply-ty-with-bound-region.rs:8:27
|
LL | with_closure(|x: u32, y| {});
| ^^^^^^^^^^^^ cannot infer type for type parameter `B` declared on the function `with_closure`
| ^ consider giving this closure parameter a type

error: aborting due to previous error

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-23046.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn let_<'var, VAR, F: for<'v> Fn(Expr<'v, VAR>) -> Expr<'v, VAR>>
}

fn main() {
let ex = |x| {
let_(add(x,x), |y| { //~ ERROR type annotations needed
let ex = |x| { //~ ERROR type annotations needed
let_(add(x,x), |y| {
let_(add(x, x), |x|x)})};
}
13 changes: 4 additions & 9 deletions src/test/ui/issues/issue-23046.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
error[E0282]: type annotations needed for the closure `fn(Expr<'_, _>) -> Expr<'_, _>`
--> $DIR/issue-23046.rs:18:9
error[E0282]: type annotations needed for `Expr<'_, VAR>`
--> $DIR/issue-23046.rs:17:15
|
LL | let_(add(x,x), |y| {
| ^^^^ cannot infer type for type parameter `VAR` declared on the function `let_`
|
help: give this closure an explicit return type without `_` placeholders
|
LL | let_(add(x, x), |x|-> Expr<'_, _> { x })})};
| ^^^^^^^^^^^^^^^^ ^
LL | let ex = |x| {
| ^ consider giving this closure parameter the explicit type `Expr<'_, VAR>`, where the type parameter `VAR` is specified

error: aborting due to previous error

Expand Down