1
Fork 0

Rollup merge of #77739 - est31:remove_unused_code, r=petrochenkov,varkor

Remove unused code

Rustc has a builtin lint for detecting unused code inside a crate, but when an item is marked `pub`, the code, even if unused inside the entire workspace, is never marked as such. Therefore, I've built [warnalyzer](https://github.com/est31/warnalyzer) to detect unused items in a cross-crate setting.

Closes https://github.com/est31/warnalyzer/issues/2
This commit is contained in:
Yuki Okushi 2020-10-15 07:32:29 +09:00 committed by GitHub
commit 022d20759b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 8 additions and 684 deletions

View file

@ -1519,8 +1519,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
}
}
pub const CODEGEN_WORKER_ID: usize = usize::MAX;
/// `FatalError` is explicitly not `Send`.
#[must_use]
pub struct WorkerFatalError;

View file

@ -479,8 +479,6 @@ fn get_argc_argv<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
}
}
pub const CODEGEN_WORKER_ID: usize = usize::MAX;
pub fn codegen_crate<B: ExtraBackendMethods>(
backend: B,
tcx: TyCtxt<'tcx>,