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

修改子类型与变异性的内容 #37

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

Dangerise
Copy link
Contributor

将variant译作变异性,以与协变区分
添加一些注解,修改翻译,使其便于理解、

本文写的还是挺晦涩的,希望这个修改对于后续阅读有帮助

Copy link
Member

@PureWhiteWu PureWhiteWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好,感谢你的修正,确实修正后阅读更通畅了。
有一个小建议,已评论~

src/subtyping.md Outdated
@@ -35,33 +35,32 @@ error[E0308]: mismatched types
| expected `&'static str`, found struct `&'world str`
```

这是相当不幸的。在这种情况下,我们希望接受的类型至少要和 `'world` 一样长。
这是相当不幸的。在这种情况下,我们希望这个函数能接受任何只需要至少包含 `'world` 的类型
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 `world 是生命周期,感觉还是原翻译好一些?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个确实是按照个人感觉翻译的,不过类型"一样长"听起来有些奇怪,也许在原翻译上加上”生命周期“就可以了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抱歉,github用得不太熟,回复一直是pending的

Copy link
Member

@PureWhiteWu PureWhiteWu Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

或者改成 “我们希望接受的类型的生命周期至少要和 'world 一样长。”这样是不是更好一些?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉是更好

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那要不按照这个改一下?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@Dangerise
Copy link
Contributor Author

另外,修复了文内的一个链接

@PureWhiteWu PureWhiteWu merged commit f045b7e into rust-lang-cn:main Dec 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants