-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
99144 enable doctests #106574
99144 enable doctests #106574
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon. Please see the contribution instructions for more information. |
Some changes occurred in need_type_info.rs cc @lcnr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have a few small comments on things to improve
@@ -288,7 +288,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> { | |||
/// | |||
/// It will not, however, work for higher-ranked bounds like: | |||
/// | |||
/// ```compile_fail,E0311 | |||
/// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this compiles now then the previous comment is wrong as well (and we should find out why)
/// # trait SomeTrait<'a> { | ||
/// # type Item; | ||
/// # } | ||
/// fn foo<'a, 'b, T: SomeTrait<'a>>() | ||
/// where | ||
/// <T as SomeTrait<'a>>::Item: 'a | ||
/// { | ||
/// | ||
/// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot more verbose and makes it harder to understand that the where clause is what's relevant here. I think it makes sense to ignore
this block.
r? @Nilstrieb ❤️ |
@@ -14,8 +14,8 @@ use rustc_middle::ty::{self, Region, TyCtxt}; | |||
/// br - the bound region corresponding to the above region which is of type `BrAnon(_)` | |||
/// | |||
/// # Example | |||
/// ```compile_fail,E0623 | |||
/// fn foo(x: &mut Vec<&u8>, y: &u8) | |||
/// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the compile_fail
here?
@@ -13,9 +13,11 @@ use crate::infer::region_constraints::VerifyIfEq; | |||
|
|||
/// Given a "verify-if-eq" type test like: | |||
/// | |||
/// ```ignore (not valid syntax) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it would be better to align the description with other parts of the document and make it ignore(illustrative).
☔ The latest upstream changes (presumably #104429) made this pull request unmergeable. Please resolve the merge conflicts. |
@technetos any updates on this? |
Oh ill fix this today |
98d590d
to
fad8d28
Compare
These commits modify the If this was intentional then you can ignore this comment. |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
You haven't addressed my and reez12g's feedback yet :) |
Co-authored-by: nils <48135649+Nilstrieb@users.noreply.github.com>
☔ The latest upstream changes (presumably #106621) made this pull request unmergeable. Please resolve the merge conflicts. |
This was subsumed by #106486, closing it. Thank you for the PR anyways! |
This PR adds fixes for doc tests, fixes #99144
r? @jyn514