]> git.lizzy.rs Git - rust.git/commitdiff
Note that `from_res` panics on errors
authorJoshua Nelson <jyn514@gmail.com>
Wed, 26 Aug 2020 02:01:01 +0000 (22:01 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 02:01:01 +0000 (22:01 -0400)
src/librustdoc/passes/collect_intra_doc_links.rs

index dedef304056aa10e7e815171d495c273fb64179b..65d116b9c670c8d396252673def660394c62b839 100644 (file)
@@ -1032,6 +1032,7 @@ fn from_str(link: &str) -> Result<(Self, &str), ()> {
         }
     }
 
+    /// WARNING: panics on `Res::Err`
     fn from_res(res: Res) -> Self {
         match res {
             Res::Def(kind, _) => Disambiguator::Kind(kind),