Skip to content

Commit acd7444

Browse files
try comment
1 parent 01decf3 commit acd7444

16 files changed

+39
-77
lines changed

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10131013
let r_b = self.shallow_resolve(predicate.skip_binder().b);
10141014
match (r_a.kind(), r_b.kind()) {
10151015
(&ty::Infer(ty::TyVar(a_vid)), &ty::Infer(ty::TyVar(b_vid))) => {
1016-
self.inner.borrow_mut().type_variables().sub(a_vid, b_vid);
1016+
//self.inner.borrow_mut().type_variables().sub(a_vid, b_vid);
10171017
return None;
10181018
}
10191019
_ => {}

src/test/ui/const-generics/occurs-check/unused-substs-5.stderr

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
error[E0308]: mismatched types
2-
--> $DIR/unused-substs-5.rs:15:9
2+
--> $DIR/unused-substs-5.rs:15:19
33
|
44
LL | x = q::<_, N>(x);
5-
| ^^^^^^^^^^^^- help: try using a conversion method: `.to_vec()`
6-
| |
7-
| cyclic type of infinite size
5+
| ^ cyclic type of infinite size
86

97
error: aborting due to previous error
108

src/test/ui/inference/cannot-infer-closure-circular.stderr

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
error[E0282]: type annotations needed for `Result<(), E>`
2-
--> $DIR/cannot-infer-closure-circular.rs:7:14
1+
error[E0282]: type annotations needed for the closure `fn(Result<(), _>) -> Result<(), _>`
2+
--> $DIR/cannot-infer-closure-circular.rs:10:9
33
|
4-
LL | let x = |r| {
5-
| ^ consider giving this closure parameter the explicit type `Result<(), E>`, where the type parameter `E` is specified
4+
LL | Ok(v)
5+
| ^^ cannot infer type for type parameter `E` declared on the enum `Result`
6+
|
7+
help: give this closure an explicit return type without `_` placeholders
8+
|
9+
LL | let x = |r| -> Result<(), _> {
10+
| ++++++++++++++++
611

712
error: aborting due to previous error
813

src/test/ui/inference/issue-71732.stderr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ error[E0283]: type annotations needed
22
--> $DIR/issue-71732.rs:18:10
33
|
44
LL | .get(&"key".into())
5-
| ^^^ ------------ this method call resolves to `T`
6-
| |
7-
| cannot infer type for type parameter `Q` declared on the associated function `get`
5+
| ^^^ cannot infer type for type parameter `Q` declared on the associated function `get`
86
|
97
= note: cannot satisfy `String: Borrow<_>`
108

src/test/ui/inference/issue-72616.stderr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ error[E0283]: type annotations needed
22
--> $DIR/issue-72616.rs:20:30
33
|
44
LL | if String::from("a") == "a".try_into().unwrap() {}
5-
| ^^ -------------- this method call resolves to `Result<T, <Self as TryInto<T>>::Error>`
6-
| |
7-
| cannot infer type
5+
| ^^ cannot infer type
86
|
97
= note: cannot satisfy `String: PartialEq<_>`
108

src/test/ui/issues/issue-51116.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
22
--> $DIR/issue-51116.rs:6:13
33
|
44
LL | for tile in row {
5-
| --- the element type for this iterator is not specified
5+
| ---- consider giving `tile` a type
66
LL |
77
LL | *tile = 0;
88
| ^^^^^ cannot infer type

src/test/ui/issues/issue-57843.nll.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/test/ui/issues/issue-59494.stderr

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
error[E0277]: expected a `Fn<(_,)>` closure, found `impl Fn<(((_, _), _),)>`
2-
--> $DIR/issue-59494.rs:21:22
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-59494.rs:20:40
33
|
4-
LL | let t8 = t8n(t7, t7p(f, g));
5-
| ^^^^^^^^^ expected an `Fn<(_,)>` closure, found `impl Fn<(((_, _), _),)>`
6-
|
7-
= help: the trait `Fn<(_,)>` is not implemented for `impl Fn<(((_, _), _),)>`
8-
note: required by a bound in `t8n`
9-
--> $DIR/issue-59494.rs:5:45
10-
|
11-
LL | fn t8n<A, B, C>(f: impl Fn(A) -> B, g: impl Fn(A) -> C) -> impl Fn(A) -> (B, C)
12-
| ^^^^^^^^^^ required by this bound in `t8n`
4+
LL | let t7 = |env| |a| |b| t7p(f, g)(((env, a), b));
5+
| ^^^ cyclic type of infinite size
136

147
error: aborting due to previous error
158

16-
For more information about this error, try `rustc --explain E0277`.
9+
For more information about this error, try `rustc --explain E0308`.

src/test/ui/occurs-check-2.stderr

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
error[E0308]: mismatched types
2-
--> $DIR/occurs-check-2.rs:7:9
2+
--> $DIR/occurs-check-2.rs:6:9
33
|
4-
LL | f = box g;
5-
| ^^^^^ cyclic type of infinite size
6-
|
7-
help: try using a conversion method
8-
|
9-
LL | f = (box g).to_string();
10-
| + +++++++++++++
4+
LL | g = f;
5+
| ^ cyclic type of infinite size
116

127
error: aborting due to previous error
138

src/test/ui/occurs-check-3.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0308]: mismatched types
2-
--> $DIR/occurs-check-3.rs:4:24
2+
--> $DIR/occurs-check-3.rs:4:32
33
|
44
LL | fn main() { let c; c = Clam::A(c); match c { Clam::A::<isize>(_) => { } } }
5-
| ^^^^^^^^^^ cyclic type of infinite size
5+
| ^ cyclic type of infinite size
66

77
error: aborting due to previous error
88

0 commit comments

Comments
 (0)