-
When trying to compile the following code, the compiler will incorrectly infer the type as `()`.
It shouldn't happen, since the returned type is `Result` and `context` doesn't change the generic valu…
-
I tried this code:
```rust
// macros/src/lib.rs
use proc_macro::TokenStream;
use quote::quote;
use syn::parse_macro_input;
#[proc_macro_derive(use_self)]
pub fn use_self(input: TokenStream)…
Y-Nak updated
3 years ago
-
1. Define the `CTL_CODE` macro and the `IoGetCurrentIrpStackLocation` function.
2. Move constants and macros (such as `FILE_DEVICE_UNKNOWN`, `METHOD_BUFFERED`, and others) from this crate and [wi…
-
This is coming out of having a fork of ros_comm in the sourced catkin_ws
```
Compiling rosrust_msg v0.1.1
error: expected one of `!` or `::`, found `=`
--> /home/lucasw/own/src/rust/rust_tes…
-
The code in question ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8e4e28528c2cc66f5e1feae5db9cb636)):
```rust
const S_CONST: &'static [u8] = unsafe {
…
-
## Environment
* **IntelliJ Rust plugin version:** 0.4.191.5270-231-nightly
* **Rust toolchain version:** 1.69.0-nightly (bd39bbb4b 2023-02-07) x86_64-apple-darwin
* **IDE name and version:** CLi…
-
**Describe the bug**
Slack thread: https://r2c-community.slack.com/archives/C018NJRRCJ0/p1652628754749719
I have noticed in a few of the rules that I have written for **RUST** that I can not match…
-
# Writing Python inside your Rust code — Part 4 - Mara's Blog
In this final part of the series, we’ll explore a trick to make the behaviour of a macro depend on whether it’s used as a sta…
-
The purpose of autocxx is to skip the need to describe the C++/Rust interface in the `cxx` IDL.
At the moment, this works for existing _C++ APIs_.
The concept could be extended to existing Rust …
-
Looks that a lot of pedantic rules are really useful to improve/unify style.
Command of manually chosen clippy rules
```
cargo clippy -- -Wclippy::bool_to_int_with_if -Wclippy::checked_conversions…