Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust-analyzer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 345d698e4d41b7b045b20756b80ed2d3a8a3214e
Choose a base ref
..
head repository: rust-lang/rust-analyzer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4ac3dc1a2f9ee25a1b054074e5592bce031377d3
Choose a head ref
Showing with 1 addition and 0 deletions.
  1. +1 −0 crates/hir-def/src/body/scope.rs
1 change: 1 addition & 0 deletions crates/hir-def/src/body/scope.rs
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ impl ExprScopes {
}

/// If `scope` refers to a macro def scope, returns the corresponding `MacroId`.
#[allow(clippy::borrowed_box)] // If we return `&MacroDefId` we need to move it, this way we just clone the `Box`.
pub fn macro_def(&self, scope: ScopeId) -> Option<&Box<MacroDefId>> {
self.scopes[scope].macro_def.as_ref()
}