mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: explain that we don't ref
in style.md
This commit is contained in:
parent
5f3662e01c
commit
12d7f5b56e
8 changed files with 31 additions and 20 deletions
|
@ -217,7 +217,7 @@ impl Crate {
|
|||
|
||||
let doc_url = doc_attr_q.tt_values().map(|tt| {
|
||||
let name = tt.token_trees.iter()
|
||||
.skip_while(|tt| !matches!(tt, TokenTree::Leaf(Leaf::Ident(Ident{text: ref ident, ..})) if ident == "html_root_url"))
|
||||
.skip_while(|tt| !matches!(tt, TokenTree::Leaf(Leaf::Ident(Ident { text, ..} )) if text == "html_root_url"))
|
||||
.nth(2);
|
||||
|
||||
match name {
|
||||
|
@ -2397,9 +2397,9 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn fields(&self, db: &dyn HirDatabase) -> Vec<(Field, Type)> {
|
||||
let (variant_id, substs) = match *self.ty.kind(&Interner) {
|
||||
TyKind::Adt(hir_ty::AdtId(AdtId::StructId(s)), ref substs) => (s.into(), substs),
|
||||
TyKind::Adt(hir_ty::AdtId(AdtId::UnionId(u)), ref substs) => (u.into(), substs),
|
||||
let (variant_id, substs) = match self.ty.kind(&Interner) {
|
||||
TyKind::Adt(hir_ty::AdtId(AdtId::StructId(s)), substs) => ((*s).into(), substs),
|
||||
TyKind::Adt(hir_ty::AdtId(AdtId::UnionId(u)), substs) => ((*u).into(), substs),
|
||||
_ => return Vec::new(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue