Don't parse intra doc links as syntax trees

This commit is contained in:
Lukas Wirth 2024-01-26 19:45:46 +01:00
parent 5a343415e8
commit 6cf7b5f8d7
8 changed files with 33 additions and 55 deletions

View file

@ -26,7 +26,6 @@ pub mod span_map;
mod fixup;
use attrs::collect_attrs;
use stdx::assert_eq_size;
use triomphe::Arc;
use std::{fmt, hash::Hash};
@ -176,7 +175,6 @@ pub struct MacroCallLoc {
pub kind: MacroCallKind,
pub call_site: Span,
}
assert_eq_size!(MacroCallLoc, 104);
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MacroDefId {
@ -187,7 +185,6 @@ pub struct MacroDefId {
pub allow_internal_unsafe: bool,
pub span: Span,
}
assert_eq_size!(MacroDefId, 44);
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum MacroDefKind {

View file

@ -15,7 +15,6 @@ use crate::{
use base_db::CrateId;
use smallvec::SmallVec;
use span::SyntaxContextId;
use stdx::assert_eq_size;
use syntax::{ast, AstNode};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
@ -23,7 +22,6 @@ pub struct ModPath {
pub kind: PathKind,
segments: SmallVec<[Name; 1]>,
}
assert_eq_size!(ModPath, 40);
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct UnescapedModPath<'a>(&'a ModPath);

View file

@ -2,7 +2,6 @@
use std::fmt;
use stdx::assert_eq_size;
use syntax::{ast, format_smolstr, utils::is_raw_identifier, SmolStr};
/// `Name` is a wrapper around string, which is used in hir for both references
@ -14,7 +13,6 @@ use syntax::{ast, format_smolstr, utils::is_raw_identifier, SmolStr};
/// name without "r#".
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct Name(Repr);
assert_eq_size!(Name, 24);
/// Wrapper of `Name` to print the name without "r#" even when it is a raw identifier.
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]