forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez rustdoc-search: handle `impl Into<X>` better This PR fixes two bugs I ran into while searching the compiler docs: - It omitted an `impl Trait` entry in the type signature field, producing `TyCtxt, , Symbol -> bool` - It didn't let me search for `TyCtxt, DefId, Symbol -> bool` even though that's a perfectly good description of the function I was looking for (the function actually used `impl Into<DefId>` r? ``@GuillaumeGomez`` cc ``@lolbinarycat``
- Loading branch information
Showing
5 changed files
with
72 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// exact-check | ||
// ignore-order | ||
|
||
const EXPECTED = [ | ||
{ | ||
'query': 'tyctxt, symbol -> bool', | ||
'others': [ | ||
{ | ||
'path': 'foo::TyCtxt', | ||
'name': 'has_attr', | ||
'displayType': "`TyCtxt`, Into<DefId>, `Symbol` -> `bool`", | ||
}, | ||
], | ||
}, | ||
{ | ||
'query': 'tyctxt, into<defid>, symbol -> bool', | ||
'others': [ | ||
{ | ||
'path': 'foo::TyCtxt', | ||
'name': 'has_attr', | ||
'displayType': "`TyCtxt`, `Into`<`DefId`>, `Symbol` -> `bool`", | ||
}, | ||
], | ||
}, | ||
{ | ||
'query': 'tyctxt, defid, symbol -> bool', | ||
'others': [ | ||
{ | ||
'path': 'foo::TyCtxt', | ||
'name': 'has_attr', | ||
'displayType': "`TyCtxt`, Into<`DefId`>, `Symbol` -> `bool`", | ||
}, | ||
], | ||
}, | ||
]; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![crate_name = "foo"] | ||
|
||
pub struct TyCtxt; | ||
pub struct DefId; | ||
pub struct Symbol; | ||
|
||
impl TyCtxt { | ||
pub fn has_attr(self, _did: impl Into<DefId>, _attr: Symbol) -> bool { | ||
unimplemented!(); | ||
} | ||
} |