You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){let b = Box::new(0);let ptr = b.into_raw();}
Current output:
error[E0599]: no method named `into_raw` found for struct `Box<{integer}>` in the current scope
--> src/main.rs:3:17
|
3 | let ptr = b.into_raw();
| --^^^^^^^^
| | |
| | this is an associated function, not a method
| help: use associated function syntax instead: `Box::<{integer}>::into_raw`
|
= note: found the following associated functions; to be used as methods, functions must have a `self` parameter
= note: the candidate is defined in an impl for the type `Box<T, A>`
However, the "help: use associated function syntax instead: Box::<{integer}>::into_raw" suggestion is internally marked as "machine applicable", even though it contains the {integer} placeholder. Running cargo fix --broken-code on this code, or using rust-analyzer's check-on-save feature and applying the quickfix thus results in invalid code:
fnmain(){let b = Box::new(0);let ptr = Box::<{integer}>::into_raw();}
The text was updated successfully, but these errors were encountered:
Current output:
However, the "help: use associated function syntax instead:
Box::<{integer}>::into_raw
" suggestion is internally marked as "machine applicable", even though it contains the{integer}
placeholder. Runningcargo fix --broken-code
on this code, or using rust-analyzer's check-on-save feature and applying the quickfix thus results in invalid code:The text was updated successfully, but these errors were encountered: