D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable
Summary: Bad diagnostic: struct is not copyable because it is annotated @disable
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2021-05-01 12:49 UTC by Tobias Pankrath
Modified: 2021-05-23 03:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Tobias Pankrath 2021-05-01 12:49:03 UTC
--
struct Outer
{
    Inner i;
}

struct Inner
{
    @disable this(this);
}

void main()
{
    Outer o1;
    Outer o2;
    o1 = o2;
}
--

Error message: Error: struct `tests.at_disable.Outer` is not copyable because it is annotated with `@disable`

Should instead say: because Outer.i is not copyable or smth. similar.
Comment 1 Dlang Bot 2021-05-11 08:50:08 UTC
@RazvanN7 created dlang/dmd pull request #12513 "Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable" fixing this issue:

- Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable

https://github.com/dlang/dmd/pull/12513
Comment 2 Dlang Bot 2021-05-23 03:29:54 UTC
dlang/dmd pull request #12513 "Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable" was merged into master:

- 38cce70aeb28a6f70ce75d6bbaecc02922617e5a by RazvanN7:
  Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable

https://github.com/dlang/dmd/pull/12513