-
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.
Consider param-env candidates even if they have errors
- Loading branch information
1 parent
4f2f477
commit 6aaa9d2
Showing
10 changed files
with
50 additions
and
104 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
17 changes: 2 additions & 15 deletions
17
tests/ui/async-await/in-trait/unconstrained-impl-region.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,22 +1,9 @@ | ||
error[E0277]: the trait bound `impl Inbox<&'a ()>: Inbox<&'a ()>` is not satisfied | ||
--> $DIR/unconstrained-impl-region.rs:16:5 | ||
| | ||
LL | async fn on_mount(self, _: impl Inbox<&'a ()>) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Inbox<&'a ()>` is not implemented for `impl Inbox<&'a ()>` | ||
| | ||
note: required by a bound in `<() as Actor>::on_mount` | ||
--> $DIR/unconstrained-impl-region.rs:16:37 | ||
| | ||
LL | async fn on_mount(self, _: impl Inbox<&'a ()>) {} | ||
| ^^^^^^^^^^^^^ required by this bound in `<() as Actor>::on_mount` | ||
|
||
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates | ||
--> $DIR/unconstrained-impl-region.rs:13:6 | ||
| | ||
LL | impl<'a> Actor for () { | ||
| ^^ unconstrained lifetime parameter | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 1 previous error | ||
|
||
Some errors have detailed explanations: E0207, E0277. | ||
For more information about an error, try `rustc --explain E0207`. | ||
For more information about this error, try `rustc --explain E0207`. |
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,10 @@ | ||
// Ensure that we don't emit an E0270 for "`impl AsRef<Path>: AsRef<Path>` not satisfied". | ||
|
||
fn foo(filename: impl AsRef<Path>) { | ||
//~^ ERROR cannot find type `Path` in this scope | ||
std::fs::write(filename, "hello").unwrap(); | ||
} | ||
|
||
fn main() { | ||
foo("/tmp/hello"); | ||
} |
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,14 @@ | ||
error[E0412]: cannot find type `Path` in this scope | ||
--> $DIR/apit-with-bad-path.rs:3:29 | ||
| | ||
LL | fn foo(filename: impl AsRef<Path>) { | ||
| ^^^^ not found in this scope | ||
| | ||
help: consider importing this struct | ||
| | ||
LL + use std::path::Path; | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
10 changes: 10 additions & 0 deletions
10
tests/ui/traits/error-reporting/where-clause-with-bad-path.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Ensure that we don't emit an E0270 for "`impl AsRef<Path>: AsRef<Path>` not satisfied". | ||
|
||
fn foo<T: AsRef<Path>>(filename: T) { | ||
//~^ ERROR cannot find type `Path` in this scope | ||
std::fs::write(filename, "hello").unwrap(); | ||
} | ||
|
||
fn main() { | ||
foo("/tmp/hello"); | ||
} |
14 changes: 14 additions & 0 deletions
14
tests/ui/traits/error-reporting/where-clause-with-bad-path.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,14 @@ | ||
error[E0412]: cannot find type `Path` in this scope | ||
--> $DIR/where-clause-with-bad-path.rs:3:17 | ||
| | ||
LL | fn foo<T: AsRef<Path>>(filename: T) { | ||
| ^^^^ not found in this scope | ||
| | ||
help: consider importing this struct | ||
| | ||
LL + use std::path::Path; | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |