Rustdoc: Cache resolved links#77700
Conversation
|
Some changes occurred in intra-doc-links. cc @jyn514 |
|
(rust_highfive has picked a reviewer for you, use r? to override) |
3a4f812 to
ff4f5c6
Compare
|
So right now, 2 tests (should) have issues, because some [error] links are expected to fire errors multiple times. I plan on changing those tests so the links in them are unique and emit the expected errors. |
There was a problem hiding this comment.
@Manishearth do you know what this is meant to test? Is it that you get a warning on different items?
If it's just testing the warning is emitted at all I'd rather use the cases in intra-link-errors.rs I think.
a2318a6 to
ce944bb
Compare
There was a problem hiding this comment.
Doesn't need to be fixed here, but I wonder if this copy is actually necessary ...
There was a problem hiding this comment.
This function could be reworked to not have any closures and not be longer as it is currently. I wanted to do it, but for the sake of minimalism, this PR is a mess right now anyway and doesn't need any more.
There was a problem hiding this comment.
Sure, seems like a good follow-up but I agree it should be separate.
Why did you make this change? Performance only matters if there are no errors, and it made the code a lot more complicated |
I think I've been doing this for too long today and misunderstood you somewhere :) |
|
Feel free to take a break :) I have homework I should be doing too 😆 |
|
I didn't undo my lifetime-related changes, but I can if the Cow -> String is inconvenient. |
46a2338 to
cca98a2
Compare
More that it causes unnecessary copies; it's probably not necessary but I'd rather not remove it since it's already there. |
c4b165d to
696cb27
Compare
Looks like this is now adding suggestions based on the original text instead of a normalized version, which isn't correct: |
|
Yup, I know, maybe I broke it during rebase |
696cb27 to
fa64c27
Compare
|
@jyn514 I undid the last two commits - the ones that spread the DiagInfo love around. I made at least two mistakes somewhere (the two commits had two different sets of test failures) and I don't have the brainpower to debug that right now. Also, the patch that depends on this one will conflict with the current split of diagnostic/resolution data. So right now this PR is a bit undercooked, but at least tests pass (locally). |
Sounds good to me, those probably belonged in different PRs anyway. I am not sure when rust-lang/rustc-perf#802 will be merged :( if it isn't by Friday I think we should just merge this anyway. Delegating to you in case I forget. @bors delegate=bugadani |
|
✌️ @bugadani can now approve this pull request |
|
📌 Commit fa64c27 has been approved by |
|
⌛ Testing commit fa64c27 with merge a1321f94ae00930fe0e091defe47f8d0dce31df1... |
|
💔 Test failed - checks-actions |
@bors retry I feel like I've seen this spurious error before, @rust-lang/infra do you recognize it? |
|
☀️ Test successful - checks-actions |
| resolution_failure( | ||
| self, | ||
| &item, | ||
| diag.item, |
There was a problem hiding this comment.
Why not just change these 4 arguments to take diag?
There was a problem hiding this comment.
Either it was forgotten, or resolution_failure is called in a lot of places where creating DiagInfo would have been a chore. I don't recall exactly.
There was a problem hiding this comment.
Yes, a few other places but they could be made to use the struct.
A step towards #77681