Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[第十二章] 代码清单12-49 在高版rust中 断言失败 #315

Open
bailaobo opened this issue Dec 23, 2020 · 3 comments
Open

[第十二章] 代码清单12-49 在高版rust中 断言失败 #315

bailaobo opened this issue Dec 23, 2020 · 3 comments
Labels
第十二章 第十二章

Comments

@bailaobo
Copy link

代码错误

代码清单12-49 第6行

//assert!(input.contains("struct A;"));
assert!(input.contains("struct A ;"));  // 这段代码 分号前 须有个空格

Rust版本

$ rustc -V
rustc 1.48.0 (7eac88abb 2020-11-16)
rustc 1.50.0-nightly (fe982319a 2020-11-19)
@ZhangHanDong ZhangHanDong added the 第十二章 第十二章 label Dec 24, 2020
@ZhangHanDong
Copy link
Owner

@bailaobo 感谢反馈。 这个断言只是判断你自己的输入。有没有空格应该是你自己判断的吧?

@bailaobo
Copy link
Author

不是的,是生成TokenStream时 加了空格

@ZhangHanDong
Copy link
Owner

好的,回头我看看

@ZhangHanDong ZhangHanDong reopened this Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
第十二章 第十二章
Projects
None yet
Development

No branches or pull requests

2 participants