-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#[derive(Clone)] | ||
pub struct Struct<A>(A); | ||
|
||
impl<A> Struct<A> { | ||
pub fn new() -> Self { | ||
todo!() | ||
} | ||
} |
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,11 @@ | ||
// aux-build:issue-69725.rs | ||
|
||
extern crate issue_69725; | ||
use issue_69725::Struct; | ||
|
||
fn crash<A>() { | ||
let _ = Struct::<A>::new().clone(); | ||
//~^ ERROR: no method named `clone` found | ||
} | ||
|
||
fn main() {} |
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,18 @@ | ||
error[E0599]: no method named `clone` found for struct `issue_69725::Struct<A>` in the current scope | ||
--> $DIR/issue-69725.rs:7:32 | ||
| | ||
LL | let _ = Struct::<A>::new().clone(); | ||
| ^^^^^ method not found in `issue_69725::Struct<A>` | ||
| | ||
::: $DIR/auxiliary/issue-69725.rs:2:1 | ||
| | ||
LL | pub struct Struct<A>(A); | ||
| ------------------------ doesn't satisfy `issue_69725::Struct<A>: std::clone::Clone` | ||
| | ||
= note: the method `clone` exists but the following trait bounds were not satisfied: | ||
`A: std::clone::Clone` | ||
which is required by `issue_69725::Struct<A>: std::clone::Clone` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0599`. |