warning: function cannot return without recursing --> src/main.rs:1:1 | 1 | fn foo() { | ^^^ cannot return without recursing 2 | foo(); | --- recursive call site | unions-with-drop-fields 此lint 检测联合的使用,其包含可能是重要丢弃代码的字段。一些触发此 lint 的示例代码: #...
//@ error-pattern: function cannot return without recursing //@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" //@ ignore-compare-mode-next-solver (hangs) // Regression test for #91949. // This hanged *forever* on 1.56, fixed by #90423. Expand All @@ -22,10 +...
Your function implementations themselves, whether in C++ or Rust,do notneed to be defined asextern "C"ABI or no_mangle. CXX will put in the right shims where necessary to make it all work. Comparison vs bindgen and cbindgen Notice that with CXX there is repetition of all the function sig...
We’ll also need to update our OOM injection tests both for the change to the function’s return type and because the assertions we have in the test may not be valid: If we try to push a new key/value pair but an allocation fails, that pair won’t be pushed. Make these changes to...
Notice that with CXX there is repetition of all the function signatures: they are typed out once where the implementation is defined (in C++ or Rust) and again inside the cxx::bridge module, though compile-time assertions guarantee these are kept in sync. This is different from bindgen and ...
checkFnDefreturn type for WF#115538 Merged borsmerged 2 commits intorust-lang:masterfromlcnr:fn-def-wf Apr 4, 2024 +153−45 rustbotassignedjackh726Sep 4, 2023 rustbotaddedS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.T-compilerRelevant to the com...
The is_power_of_two method on unsigned numeric types is now a const function. Stabilized APIs BTreeMap::get_key_value HashMap::get_key_value Option::as_deref_mut Option::as_deref Option::flatten UdpSocket::peer_addr f32::to_be_bytes f32::to_le_bytes f32::to_ne_bytes f64::to...
The iter::once function returns an iterator that yields a single element, and iter::empty returns an iterator that yields no elements. The matches and rmatches methods on str return iterators over substring matches. Cell and RefCell both implement Eq. A number of methods for wrapping arithmetic...
The iter::once function returns an iterator that yields a single element, and iter::empty returns an iterator that yields no elements. The matches and rmatches methods on str return iterators over substring matches. Cell and RefCell both implement Eq. A number of methods for wrapping arithmetic...