-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
structurally_normalize
instead of manual normalizes-to
goals
- Loading branch information
Showing
21 changed files
with
254 additions
and
108 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 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
8 changes: 4 additions & 4 deletions
8
...ync-await/async-closures/is-not-fn.stderr → ...t/async-closures/is-not-fn.current.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,15 +1,15 @@ | ||
error[E0271]: expected `{async [email protected]:5:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:5:23: 5:25}` | ||
--> $DIR/is-not-fn.rs:5:14 | ||
error[E0271]: expected `{async [email protected]:8:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}` | ||
--> $DIR/is-not-fn.rs:8:14 | ||
| | ||
LL | needs_fn(async || {}); | ||
| -------- ^^^^^^^^^^^ expected `()`, found `async` closure body | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= note: expected unit type `()` | ||
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:5:23: 5:25}` | ||
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}` | ||
note: required by a bound in `needs_fn` | ||
--> $DIR/is-not-fn.rs:4:25 | ||
--> $DIR/is-not-fn.rs:7:25 | ||
| | ||
LL | fn needs_fn(x: impl FnOnce()) {} | ||
| ^^^^^^^^ required by this bound in `needs_fn` | ||
|
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,19 @@ | ||
error[E0271]: expected `{async [email protected]:8:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}` | ||
--> $DIR/is-not-fn.rs:8:14 | ||
| | ||
LL | needs_fn(async || {}); | ||
| -------- ^^^^^^^^^^^ expected `()`, found `async` closure body | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= note: expected unit type `()` | ||
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}` | ||
note: required by a bound in `needs_fn` | ||
--> $DIR/is-not-fn.rs:7:25 | ||
| | ||
LL | fn needs_fn(x: impl FnOnce()) {} | ||
| ^^^^^^^^ required by this bound in `needs_fn` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0271`. |
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,7 +1,10 @@ | ||
//@ edition:2021 | ||
//@ revisions: current next | ||
//@ ignore-compare-mode-next-solver (explicit revisions) | ||
//@[next] compile-flags: -Znext-solver | ||
|
||
fn main() { | ||
fn needs_fn(x: impl FnOnce()) {} | ||
needs_fn(async || {}); | ||
//~^ ERROR expected `{async [email protected]:5:14}` to be a closure that returns `()` | ||
//~^ ERROR expected `{async [email protected]:8:14}` to be a closure that returns `()` | ||
} |
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
29 changes: 29 additions & 0 deletions
29
tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.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,29 @@ | ||
error[E0407]: method `line_stream` is not a member of trait `X` | ||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:5 | ||
| | ||
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `X` | ||
|
||
error[E0049]: type `LineStream` has 0 type parameters but its trait declaration has 1 type parameter | ||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:25:21 | ||
| | ||
LL | type LineStream<'a, Repr> | ||
| -- ---- | ||
| | | ||
| expected 1 type parameter | ||
... | ||
LL | type LineStream<'c, 'd> = impl Stream; | ||
| ^^ ^^ | ||
| | | ||
| found 0 type parameters | ||
|
||
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()` | ||
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:43 | ||
| | ||
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0049, E0271, E0407. | ||
For more information about an error, try `rustc --explain E0049`. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)` | ||
--> $DIR/issue-33941.rs:9:36 | ||
| | ||
LL | for _ in HashMap::new().iter().cloned() {} | ||
| ^^^^^^ expected `&_`, found `(&_, &_)` | ||
| | ||
= note: expected reference `&_` | ||
found tuple `(&_, &_)` | ||
note: required by a bound in `cloned` | ||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | ||
|
||
error[E0271]: expected `Iter<'_, _, _>` to be an iterator that yields `&_`, but it yields `(&_, &_)` | ||
--> $DIR/issue-33941.rs:9:14 | ||
| | ||
LL | for _ in HashMap::new().iter().cloned() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `(&_, &_)` | ||
| | ||
= note: expected reference `&_` | ||
found tuple `(&_, &_)` | ||
= note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `Iterator` | ||
= note: required for `Cloned<std::collections::hash_map::Iter<'_, _, _>>` to implement `IntoIterator` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0271`. |
Oops, something went wrong.