Skip to content

Unify error reporting for intra-doc links #75916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use map_or(true) instead of unwrap_or(true)
Co-authored-by: Ivan Tham <pickfire@riseup.net>
  • Loading branch information
jyn514 and pickfire authored Aug 26, 2020
commit bb351defba42f5019d4ab34f2baf43c703519067
2 changes: 1 addition & 1 deletion src/librustc_hir/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,6 @@ impl<Id> Res<Id> {

/// Always returns `true` if `self` is `Res::Err`
pub fn matches_ns(&self, ns: Namespace) -> bool {
self.ns().map(|actual_ns| actual_ns == ns).unwrap_or(true)
self.ns().map_or(true, |actual_ns| actual_ns == ns)
}
}