diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-18 17:37:24 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-20 08:45:39 -0400 |
| commit | 45b989a03319c6a53bb726ec98dfe7d172035ac6 (patch) | |
| tree | 072c2bea54d0a91860739ab5aa5e3293a3d9c66a /compiler/rustc_interface/src | |
| parent | 5e1a614b5369c430a383beaf1aec04f09740edbb (diff) | |
| download | rust-45b989a03319c6a53bb726ec98dfe7d172035ac6.tar.gz rust-45b989a03319c6a53bb726ec98dfe7d172035ac6.zip | |
Enable 2021 compatibility lints for all in-tree code
This just applies the suggested fixes from the compatibility warnings, leaving any that are in practice spurious in. This is primarily intended to provide a starting point to identify possible fixes to the migrations (e.g., by avoiding spurious warnings). A secondary commit cleans these up where they are false positives (as is true in many of the cases).
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index a5f0c014778..3d90a6c9345 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -125,6 +125,7 @@ pub fn scoped_thread<F: FnOnce() -> R + Send, R: Send>(cfg: thread::Builder, f: let result_ptr = Ptr(&mut result as *mut _ as *mut ()); let thread = cfg.spawn(move || { + let _ = (&run, &result_ptr); let run = unsafe { (*(run.0 as *mut Option<F>)).take().unwrap() }; let result = unsafe { &mut *(result_ptr.0 as *mut Option<R>) }; *result = Some(run()); |
