Add a rustdoc test#11032
Merged
bors merged 2 commits intorust-lang:masterfrom Dec 19, 2013
emberian:rustdoc_test
Merged
Conversation
src/librustdoc/html/render.rs
Outdated
Member
There was a problem hiding this comment.
No need to clone initially, this could just be ~[(self, item)]
This is just a smoke test which verifies that the expected files are generated. Also makes the rmake tests have the right deps.
This partially reverts 8b5a317.
bors
added a commit
that referenced
this pull request
Dec 18, 2013
This is just a smoke test which verifies that the expected files are generated.
matthiaskrgr
pushed a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 21, 2024
…, r=Jarcho lint when calling the blanket `Into` impl from a `From` impl Closes rust-lang#11150 ``` warning: function cannot return without recursing --> x.rs:9:9 | 9 | / fn from(value: f32) -> Self { 10 | | value.into() 11 | | } | |_________^ | note: recursive call site --> x.rs:10:13 | 10 | value.into() | ^^^^^^^^^^^^ ``` I'm also thinking that we can probably generalize this lint to rust-lang#11032 at some point (instead of hardcoding a bunch of impls), like how rustc's `unconditional_recursion` works, at least up to one indirect call, but this still seems useful for now :) I've also noticed that we use `fn_def_id` in a bunch of lints and then try to get the node args of the call in a separate step, so I made a helper function that does both in one. I intend to refactor a bunch of uses of `fn_def_id` to use this later I can add more test cases, but this is already using much of the same logic that exists for the other impls that this lint looks for (e.g. making sure that there are no conditional returns). changelog: [`unconditional_recursion`]: emit a warning inside of `From::from` when unconditionally calling the blanket `.into()` impl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a smoke test which verifies that the expected files are
generated.