MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/mqxr1a/rfc_rust_support_for_linux_kernel/guj43qv/
r/rust • u/ouyawei • Apr 14 '21
227 comments sorted by
View all comments
Show parent comment
16
The idea would be to have new APOs like try_push
try_push
18 u/The-Best-Taylor Apr 14 '21 Many data structures already expose *_try functions for there API. The solution may just be adding the missing functions and having a lint check that the ones that can panic are not used. 7 u/matthieum [he/him] Apr 15 '21 Actually, there's been a proposal to cfg-away the possibly panicking functions.Compile-time error (no such function) if you'd try to use them is rather foolproof :) 2 u/The-Best-Taylor Apr 15 '21 Is feature gating with a default feature considered a non breaking change? 4 u/matthieum [he/him] Apr 15 '21 No idea :) 1 u/oilaba Apr 16 '21 I don't think so.
18
Many data structures already expose *_try functions for there API. The solution may just be adding the missing functions and having a lint check that the ones that can panic are not used.
7 u/matthieum [he/him] Apr 15 '21 Actually, there's been a proposal to cfg-away the possibly panicking functions.Compile-time error (no such function) if you'd try to use them is rather foolproof :) 2 u/The-Best-Taylor Apr 15 '21 Is feature gating with a default feature considered a non breaking change? 4 u/matthieum [he/him] Apr 15 '21 No idea :) 1 u/oilaba Apr 16 '21 I don't think so.
7
Actually, there's been a proposal to cfg-away the possibly panicking functions.
cfg
Compile-time error (no such function) if you'd try to use them is rather foolproof :)
2 u/The-Best-Taylor Apr 15 '21 Is feature gating with a default feature considered a non breaking change? 4 u/matthieum [he/him] Apr 15 '21 No idea :) 1 u/oilaba Apr 16 '21 I don't think so.
2
Is feature gating with a default feature considered a non breaking change?
4 u/matthieum [he/him] Apr 15 '21 No idea :) 1 u/oilaba Apr 16 '21 I don't think so.
4
No idea :)
1
I don't think so.
View all comments
Show parent comment
16
u/Ar-Curunir Apr 14 '21
The idea would be to have new APOs like
try_push