-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix needless_doctest_main span #5241
Conversation
ICE seems unrelated. Probably #5238. |
Yeah, the failure is unrelated. And I noticed AppVeyor still lives for branch CI, not only master :/ We can say goodbye to them completely by removing AppVeyor's project iirc. |
75d19db
to
92f5c73
Compare
92f5c73
to
baae1f9
Compare
☔ The latest upstream changes (presumably #5259) made this pull request unmergeable. Please resolve the merge conflicts. |
baae1f9
to
a45af45
Compare
clippy_lints/src/doc.rs
Outdated
let lo = span.lo() + BytePos::from_usize(range.start - begin); | ||
// we need a span that includes at least the code. | ||
// however, because we have already stripped the comment | ||
// prefixes, we need to add their size back. We currently |
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.
// prefixes, we need to add their size back. We currently | |
// prefixes (`/// `), we need to add their size back. We currently |
Took me way too long to figure out what you meant by "comment prefixes". Can you add this for people like me? 😄
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.
Sure. I'm rebuilding the branch anyway, because somehow a rebase went wrong.
@@ -67,7 +67,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NoNegCompOpForPartialOrd { | |||
}; | |||
|
|||
let implements_partial_ord = { | |||
if let Some(id) = utils::get_trait_def_id(cx, &paths::PARTIAL_ORD) { | |||
if let Some(id) = cx.tcx.lang_items().partial_ord_trait() { |
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.
Seems like something gone wrong with the rebase?
a45af45
to
74eae9d
Compare
First, I extend the ranges, not just the text when I coalesce two events and second: I use this (and work around the removed prefixes by counting the newlines and multiplying by 4, which is admittedly a bit hacky) when finding the
fn main()
.This fixes #5236.
changelog: none