@@ -88,7 +88,7 @@ considered incompatible.
88
88
* [ Possibly-breaking: introducing a new function type parameter] ( #fn-generic-new )
89
89
* [ Minor: generalizing a function to use generics (supporting original type)] ( #fn-generalize-compatible )
90
90
* [ Major: generalizing a function to use generics with type mismatch] ( #fn-generalize-mismatch )
91
- * [ Possibly-breaking : making an ` unsafe ` function safe] ( #fn-unsafe-safe )
91
+ * [ Minor : making an ` unsafe ` function safe] ( #fn-unsafe-safe )
92
92
* Attributes
93
93
* [ Major: switching from ` no_std ` support to requiring ` std ` ] ( #attr-no-std-to-std )
94
94
* [ Major: adding ` non_exhaustive ` to an existing enum, variant, or struct with no private fields] ( #attr-adding-non-exhaustive )
@@ -1082,12 +1082,14 @@ fn main() {
1082
1082
```
1083
1083
1084
1084
<a id =" fn-unsafe-safe " ></a >
1085
- ### Possibly-breaking : making an ` unsafe ` function safe
1085
+ ### Minor : making an ` unsafe ` function safe
1086
1086
1087
- A previously ` unsafe ` function can be made safe without breaking code. Note
1088
- however that it will likely cause the [ ` unused_unsafe ` ] [ unused_unsafe ] lint
1089
- to trigger as in the example below, which will cause local crates that have
1090
- specified ` #![deny(warnings)] ` to stop compiling.
1087
+ A previously ` unsafe ` function can be made safe without breaking code.
1088
+
1089
+ Note however that it may cause the [ ` unused_unsafe ` ] [ unused_unsafe ] lint to
1090
+ trigger as in the example below, which will cause local crates that have
1091
+ specified ` #![deny(warnings)] ` to stop compiling. Per [ introducing new
1092
+ lints] ( #new-lints ) , it is allowed for updates to introduce new warnings.
1091
1093
1092
1094
Going the other way (making a safe function ` unsafe ` ) is a breaking change.
1093
1095
@@ -1118,33 +1120,7 @@ fn main() {
1118
1120
1119
1121
Making a previously ` unsafe ` associated function or method on structs / enums
1120
1122
safe is also a minor change, while the same is not true for associated
1121
- function on traits:
1122
-
1123
- ``` rust,ignore
1124
- // MAJOR CHANGE
1125
-
1126
- ///////////////////////////////////////////////////////////
1127
- // Before
1128
- pub trait Foo {
1129
- unsafe fn foo();
1130
- }
1131
-
1132
- ///////////////////////////////////////////////////////////
1133
- // After
1134
- pub trait Foo {
1135
- fn foo();
1136
- }
1137
-
1138
- ///////////////////////////////////////////////////////////
1139
- // Example usage that will break.
1140
- use updated_crate::Foo;
1141
-
1142
- struct Bar;
1143
-
1144
- impl Foo for Bar {
1145
- unsafe fn foo() {} // Error: method `foo` has an incompatible type for trait
1146
- }
1147
- ```
1123
+ function on traits (see [ any change to trait item signatures] ( #trait-item-signature ) ).
1148
1124
1149
1125
<a id =" attr-no-std-to-std " ></a >
1150
1126
### Major: switching from ` no_std ` support to requiring ` std `
0 commit comments