Skip to content

docs: Better document breaking change policy and recommended usage - #5179

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
tgross35:docs-update
Jun 24, 2026
Merged

docs: Better document breaking change policy and recommended usage#5179
tgross35 merged 1 commit into
rust-lang:mainfrom
tgross35:docs-update

Conversation

@tgross35

Copy link
Copy Markdown
Contributor

For a while there has been an informal policy about what is and isn't allowed regarding breaking changes, but it hasn't been written down anywhere. This is an attempt to start to give our users some more concrete expectations, documented in the "Stability Expectations" section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to give actionable suggestions about how to avoid breakage and other problems.

Closes: #5018

@tgross35

Copy link
Copy Markdown
Contributor Author

@JohnTitor I still need to re-read through this and make sure it actually makes sense, but I'd love your thoughts here when you get the chance.

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 18, 2026
dybucc added a commit to dybucc/libc that referenced this pull request Jun 18, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great so far, leaving some style comments. Feel free to merge after addressing these nits. Thanks a lot!

View changes since this review

Comment thread src/lib.rs Outdated
//! This feature is expected to be removed in libc 1.0. Libraries should instead hash or check
//! equality of only needed fields.
//!
//! - The features `const-extern-function`, `align`, and `use_std` are all deprecated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
//! - The features `const-extern-function`, `align`, and `use_std` are all deprecated.
//! - The features `const-extern-fn`, `align`, and `use_std` are all deprecated.

Comment thread src/lib.rs Outdated
//! relaxed API stability requirements, and API stability is not enforced on tier 3 targets.
//!
//! While this section seems scary, keep in mind that it is meant to cover worst-case scenarios. In
//! practice, breakage is rare and following the above-discussed [Best Practices](#best-practices)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I might be missing something but I don't see this section.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, meant for this to link to the top section. Thanks!

Comment thread src/lib.rs Outdated
//!
//! # Usage Recommendations
//!
//! `libc` takes a differe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems incomplete.

dybucc added a commit to dybucc/libc that referenced this pull request Jun 19, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
dybucc added a commit to dybucc/libc that referenced this pull request Jun 19, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
dybucc added a commit to dybucc/libc that referenced this pull request Jun 23, 2026
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
For a while there has been an informal policy about what is and isn't
allowed regarding breaking changes, but it hasn't been written down
anywhere. This is an attempt to start to give our users some more
concrete expectations, documented in the "Stability Expectations"
section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to
give actionable suggestions about how to avoid breakage and other
problems.

Closes: rust-lang#5018
@tgross35
tgross35 enabled auto-merge June 24, 2026 07:29
@tgross35
tgross35 added this pull request to the merge queue Jun 24, 2026
Merged via the queue into rust-lang:main with commit 9595912 Jun 24, 2026
54 checks passed
@tgross35
tgross35 deleted the docs-update branch June 24, 2026 07:54
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
For a while there has been an informal policy about what is and isn't
allowed regarding breaking changes, but it hasn't been written down
anywhere. This is an attempt to start to give our users some more
concrete expectations, documented in the "Stability Expectations"
section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to
give actionable suggestions about how to avoid breakage and other
problems.

Closes: rust-lang#5018

(backport <rust-lang#5179>)
(cherry picked from commit 9595912)
This was referenced Jul 20, 2026
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
For a while there has been an informal policy about what is and isn't
allowed regarding breaking changes, but it hasn't been written down
anywhere. This is an attempt to start to give our users some more
concrete expectations, documented in the "Stability Expectations"
section. I expect this will be updated as we think of more cases.

I additionally added a "Usage Recommendations" section that is meant to
give actionable suggestions about how to avoid breakage and other
problems.

Closes: rust-lang#5018

(backport <rust-lang#5179>)
(cherry picked from commit 9595912)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align docs for breaking change policy

3 participants