-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not fail
method_autoderef_steps
on infer types. Let method resol…
…ution handle it
- Loading branch information
Showing
33 changed files
with
122 additions
and
238 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 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.
8 changes: 7 additions & 1 deletion
8
tests/crashes/121613.rs → ...mismatch_on_associatedtype_constructor.rs
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
22 changes: 22 additions & 0 deletions
22
tests/ui/associated-types/param_mismatch_on_associatedtype_constructor.stderr
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,22 @@ | ||
error[E0034]: multiple applicable items in scope | ||
--> $DIR/param_mismatch_on_associatedtype_constructor.rs:10:36 | ||
| | ||
LL | let <E>::V(..) = E::V(|a, b| a.cmp(b)); | ||
| ^^^ multiple `cmp` found | ||
| | ||
note: candidate #1 is defined in the trait `Iterator` | ||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | ||
note: candidate #2 is defined in the trait `Ord` | ||
--> $SRC_DIR/core/src/cmp.rs:LL:COL | ||
help: disambiguate the method for candidate #1 | ||
| | ||
LL | let <E>::V(..) = E::V(|a, b| Iterator::cmp(a, b)); | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
help: disambiguate the method for candidate #2 | ||
| | ||
LL | let <E>::V(..) = E::V(|a, b| Ord::cmp(&a, b)); | ||
| ~~~~~~~~~~~~~~~ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0034`. |
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
21 changes: 11 additions & 10 deletions
21
tests/ui/autoref-autoderef/deref-ambiguity-becomes-nonambiguous.stderr
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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
error[E0282]: type annotations needed for `Value<Rc<_>>` | ||
--> $DIR/deref-ambiguity-becomes-nonambiguous.rs:31:9 | ||
error[E0277]: the size for values of type `dyn Fn(_, _) -> _` cannot be known at compilation time | ||
--> $DIR/deref-ambiguity-becomes-nonambiguous.rs:38:13 | ||
| | ||
LL | let var_fn = Value::wrap(); | ||
| ^^^^^^ | ||
... | ||
LL | let _ = var_fn.clone(); | ||
| ----- type must be known at this point | ||
| ^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
help: consider giving `var_fn` an explicit type, where the placeholders `_` are specified | ||
= help: the trait `Sized` is not implemented for `dyn Fn(_, _) -> _`, which is required by `Value<Rc<_>>: Deref` | ||
note: required for `Value<Rc<dyn Fn(_, _) -> _>>` to implement `Deref` | ||
--> $DIR/deref-ambiguity-becomes-nonambiguous.rs:22:9 | ||
| | ||
LL | let var_fn: Value<Rc<_>> = Value::wrap(); | ||
| ++++++++++++++ | ||
LL | impl<F> Deref for Value<Rc<F>> { | ||
| - ^^^^^ ^^^^^^^^^^^^ | ||
| | | ||
| unsatisfied trait bound introduced here | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. | ||
For more information about this error, try `rustc --explain E0277`. |
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 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 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 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 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
30 changes: 7 additions & 23 deletions
30
tests/ui/impl-trait/hidden-type-is-opaque-2.default.stderr
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 |
---|---|---|
@@ -1,31 +1,15 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/hidden-type-is-opaque-2.rs:10:17 | ||
error[E0599]: no method named `reify_as` found for type `_` in the current scope | ||
--> $DIR/hidden-type-is-opaque-2.rs:11:14 | ||
| | ||
LL | Thunk::new(|mut cont| { | ||
| ^^^^^^^^ | ||
LL | | ||
LL | cont.reify_as(); | ||
| -------- type must be known at this point | ||
| | ||
help: consider giving this closure parameter an explicit type | ||
| | ||
LL | Thunk::new(|mut cont: /* Type */| { | ||
| ++++++++++++ | ||
| ^^^^^^^^ method not found in `_` | ||
|
||
error[E0282]: type annotations needed | ||
--> $DIR/hidden-type-is-opaque-2.rs:20:17 | ||
error[E0599]: no method named `reify_as` found for type `_` in the current scope | ||
--> $DIR/hidden-type-is-opaque-2.rs:21:14 | ||
| | ||
LL | Thunk::new(|mut cont| { | ||
| ^^^^^^^^ | ||
LL | | ||
LL | cont.reify_as(); | ||
| -------- type must be known at this point | ||
| | ||
help: consider giving this closure parameter an explicit type | ||
| | ||
LL | Thunk::new(|mut cont: /* Type */| { | ||
| ++++++++++++ | ||
| ^^^^^^^^ method not found in `_` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0282`. | ||
For more information about this error, try `rustc --explain E0599`. |
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 |
---|---|---|
@@ -1,31 +1,15 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/hidden-type-is-opaque-2.rs:10:17 | ||
error[E0599]: no method named `reify_as` found for type `_` in the current scope | ||
--> $DIR/hidden-type-is-opaque-2.rs:11:14 | ||
| | ||
LL | Thunk::new(|mut cont| { | ||
| ^^^^^^^^ | ||
LL | | ||
LL | cont.reify_as(); | ||
| -------- type must be known at this point | ||
| | ||
help: consider giving this closure parameter an explicit type | ||
| | ||
LL | Thunk::new(|mut cont: /* Type */| { | ||
| ++++++++++++ | ||
| ^^^^^^^^ method not found in `_` | ||
|
||
error[E0282]: type annotations needed | ||
--> $DIR/hidden-type-is-opaque-2.rs:20:17 | ||
error[E0599]: no method named `reify_as` found for type `_` in the current scope | ||
--> $DIR/hidden-type-is-opaque-2.rs:21:14 | ||
| | ||
LL | Thunk::new(|mut cont| { | ||
| ^^^^^^^^ | ||
LL | | ||
LL | cont.reify_as(); | ||
| -------- type must be known at this point | ||
| | ||
help: consider giving this closure parameter an explicit type | ||
| | ||
LL | Thunk::new(|mut cont: /* Type */| { | ||
| ++++++++++++ | ||
| ^^^^^^^^ method not found in `_` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0282`. | ||
For more information about this error, try `rustc --explain E0599`. |
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 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
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
Oops, something went wrong.