Skip to content

Conversation

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates C# compiler diagnostic documentation by consolidating several constructor/struct-initialization errors into the newer themed “constructor declarations” article, updating navigation, and adding redirects from legacy per-error pages.

Changes:

  • Moved CS0132, CS0573, and CS1018 guidance into constructor-errors.md, and removed the legacy standalone pages.
  • Updated TOC and “no specifics” fallback page to reflect the new diagnostic coverage.
  • Added redirects for removed pages, and refreshed wording in related diagnostic theme pages.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Removes diagnostics that now have dedicated guidance elsewhere.
docs/csharp/misc/cs0573.md Removes legacy per-error page (replaced by themed article + redirect).
docs/csharp/misc/cs0132.md Removes legacy per-error page (replaced by themed article + redirect).
docs/csharp/language-reference/toc.yml Re-points diagnostic navigation to the themed constructor article and removes old entries.
docs/csharp/language-reference/compiler-messages/source-generator-errors.md Minor wording updates for consistency.
docs/csharp/language-reference/compiler-messages/feature-version-errors.md Updates the listed CS9041 diagnostic text.
docs/csharp/language-reference/compiler-messages/cs1018.md Removes legacy per-error page (replaced by themed article + redirect).
docs/csharp/language-reference/compiler-messages/constructor-errors.md Major refactor and expansion to include additional constructor/struct-init diagnostics.
.openpublishing.redirection.csharp.json Adds redirects for removed pages to the new themed sections.
Comments suppressed due to low confidence (1)

docs/csharp/language-reference/compiler-messages/constructor-errors.md:188

  • This section heading is ## Constructor declaration, which produces the anchor #constructor-declaration. However, several existing redirects target constructor-errors#constructor-declarations (for example, .openpublishing.redirection.csharp.json entries for CS0526, CS0710, and CS0824). Rename this heading to ## Constructor declarations or add an explicit anchor so those redirects continue to land on the intended section.
## Constructor declaration

- **CS0526**: *Interfaces cannot contain constructors.*

@BillWagner BillWagner enabled auto-merge (squash) January 29, 2026 18:42
@BillWagner BillWagner merged commit 54facfc into dotnet:main Jan 29, 2026
9 checks passed
@BillWagner BillWagner deleted the struct-initialization-errors branch January 29, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add C# 11 errors and warnings for struct initialization and auto default structs

2 participants