Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fyhhub authored Apr 12, 2024
1 parent 15487f2 commit 6eea212
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rust-learn/笔记/1.常见宏使用.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 常见宏使用

## #[repr]

![17128837221061712883721238.png](https://fastly.jsdelivr.net/gh/fyhhub/imgs@main/17128837221061712883721238.png)


虽然,Rust 编译器默认为开发者优化结构体的排列,但你也可以使用`#[repr]`宏,强制让 Rust 编译器不做优化,和 C 的行为一致,这样,Rust 代码可以方便地和 C 代码无缝交互。
File renamed without changes.
1 change: 1 addition & 0 deletions src/rust-learn/笔记/3.常见方法使用.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 常见方法使用
File renamed without changes.
1 change: 1 addition & 0 deletions src/rust-learn/笔记/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 笔记

0 comments on commit 6eea212

Please sign in to comment.