@@ -144,6 +144,9 @@ relatively small, it could be an option to leave the "opt out"
144
144
mechanism in place permanently. In either case, use of the "opt out"
145
145
API would trigger the deprecation lint.
146
146
147
+ Note that we should make every effort to ensure that crates which
148
+ employ this opt out can be used compatibly with crates that do not.
149
+
147
150
#### Changes that alter dynamic semantics versus typing rules
148
151
149
152
In some cases, fixing a bug may not cause crates to stop compiling,
@@ -266,6 +269,26 @@ observe on `crates.io` will be of the total breakage that will occur:
266
269
it is certainly possible that all crates on ` crates.io ` work fine, but
267
270
the change still breaks a large body of code we do not have access to.
268
271
272
+ ** What attribute should we use to "opt out" of soundness changes?**
273
+ The section on breaking changes indicated that it may sometimes be
274
+ appropriate to includ an "opt out" that people can use to temporarily
275
+ revert to older, unsound type rules, but did not specify precisely
276
+ what that opt-out should look like. Ideally, we would identify a
277
+ specific attribute in advance that will be used for such purposes. In
278
+ the past, we have simply created ad-hoc attributes (e.g.,
279
+ ` #[old_orphan_check] ` ), but because custom attributes are forbidden by
280
+ stable Rust, this has the unfortunate side-effect of meaning that code
281
+ which opts out of the newer rules cannot be compiled on older
282
+ compilers (even though it's using the older type system rules). If we
283
+ introduce an attribute in advance we will not have this problem.
284
+
285
+ ** Are there any other circumstances in which we might perform a
286
+ breaking change?** In particular, it may happen from time to time that
287
+ we wish to alter some detail of a stable component. If we believe that
288
+ this change will not affect anyone, such a change may be worth doing,
289
+ but we'll have to work out more precise guidelines. [ RFC 1156] is an
290
+ example.
291
+
269
292
[ RFC 1105 ] : https://github.com/rust-lang/rfcs/pull/1105
270
293
[ RFC 320 ] : https://github.com/rust-lang/rfcs/pull/320
271
294
[ #744 ] : https://github.com/rust-lang/rfcs/issues/744
@@ -281,3 +304,4 @@ the change still breaks a large body of code we do not have access to.
281
304
[ RFC 560 ] : https://github.com/rust-lang/rfcs/pull/560
282
305
[ macro ] : https://internals.rust-lang.org/t/pre-rfc-macro-improvements/2088
283
306
[ #24451 ] : https://github.com/rust-lang/rust/pull/24451
307
+ [ RFC 1156 ] : https://github.com/rust-lang/rfcs/pull/1156
0 commit comments