Skip to content

Commit

Permalink
Fighting Git
Browse files Browse the repository at this point in the history
  • Loading branch information
wyatt-herkamp committed Mar 9, 2024
1 parent 33282c7 commit 26091c5
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/cfg/src/cfg_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ where
result
}

pub fn next_cfg_expr<S>(it: &mut SliceIter<'_, tt::TokenTree<S>>) -> Option<CfgExpr> {
fn next_cfg_expr<S>(it: &mut SliceIter<'_, tt::TokenTree<S>>) -> Option<CfgExpr> {
let name = match it.next() {
None => return None,
Some(tt::TokenTree::Leaf(tt::Leaf::Ident(ident))) => ident.text.clone(),
Expand Down
1 change: 0 additions & 1 deletion crates/cfg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::fmt;
use rustc_hash::FxHashSet;
use tt::SmolStr;

pub use cfg_attr::CfgAttr;
pub use cfg_expr::{CfgAtom, CfgExpr};
pub use dnf::DnfExpr;

Expand Down
10 changes: 1 addition & 9 deletions crates/hir-expand/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use syntax::{
ast::{self, HasAttrs},
AstNode, Parse, SyntaxElement, SyntaxError, SyntaxNode, SyntaxToken, T,
};
use tracing::info;
use triomphe::Arc;

use crate::{
Expand Down Expand Up @@ -462,14 +461,7 @@ fn macro_arg(
}
}
}
fn censor_cfg_elements(
node: &SyntaxNode,
loc: &MacroCallLoc,
span_map: &SpanMap,
db: &dyn ExpandDatabase,
) -> FxHashSet<SyntaxElement> {
cfg_process::process_cfg_attrs(node, loc, span_map, db).unwrap_or_default()
}

// FIXME: Censoring info should be calculated by the caller! Namely by name resolution
/// Certain macro calls expect some nodes in the input to be preprocessed away, namely:
/// - derives expect all `#[derive(..)]` invocations up to the currently invoked one to be stripped
Expand Down
1 change: 0 additions & 1 deletion crates/hir-expand/src/fixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pub(crate) fn fixup_syntax(
) -> SyntaxFixups {
let mut append = FxHashMap::<SyntaxElement, _>::default();
let mut remove = FxHashSet::<SyntaxElement>::default();
let mut remove = FxHashSet::<SyntaxElement>::default();
let mut preorder = node.preorder();
let mut original = Vec::new();
let dummy_range = FIXUP_DUMMY_RANGE;
Expand Down
1 change: 0 additions & 1 deletion crates/mbe/src/syntax_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use syntax::{
SyntaxKind::{self, *},
SyntaxNode, SyntaxToken, SyntaxTreeBuilder, TextRange, TextSize, WalkEvent, T,
};
use tracing::info;
use tt::{
buffer::{Cursor, TokenBuffer},
Span,
Expand Down

0 comments on commit 26091c5

Please sign in to comment.