Skip to content

Commit

Permalink
Simplify trait impl asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha committed Aug 29, 2020
1 parent 8146700 commit e8ddc5b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions crates/ide/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ impl Default for AnalysisHost {
/// state is advanced using `AnalysisHost::apply_change` method, all existing
/// `Analysis` are canceled (most method return `Err(Canceled)`).
#[derive(Debug)]
pub struct Analysis {
pub struct Analysis
where
Self: Send,
{
db: salsa::Snapshot<RootDatabase>,
}

Expand Down Expand Up @@ -508,9 +511,3 @@ impl Analysis {
self.db.catch_canceled(f)
}
}

#[test]
fn analysis_is_send() {
fn is_send<T: Send>() {}
is_send::<Analysis>();
}

0 comments on commit e8ddc5b

Please sign in to comment.