Skip to content

Commit 4c98cb6

Browse files
committed
rustc_codegen_llvm: deny(internal).
1 parent 87b6b86 commit 4c98cb6

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/librustc_codegen_llvm/debuginfo/metadata.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -2257,11 +2257,7 @@ pub fn create_global_var_metadata(
22572257
/// given type.
22582258
///
22592259
/// Adds the created metadata nodes directly to the crate's IR.
2260-
pub fn create_vtable_metadata(
2261-
cx: &CodegenCx<'ll, 'tcx>,
2262-
ty: ty::Ty<'tcx>,
2263-
vtable: &'ll Value,
2264-
) {
2260+
pub fn create_vtable_metadata(cx: &CodegenCx<'ll, 'tcx>, ty: Ty<'tcx>, vtable: &'ll Value) {
22652261
if cx.dbg_cx.is_none() {
22662262
return;
22672263
}

src/librustc_codegen_llvm/intrinsic.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ fn generic_simd_intrinsic(
14171417
// FIXME: use:
14181418
// https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Function.h#L182
14191419
// https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Intrinsics.h#L81
1420-
fn llvm_vector_str(elem_ty: ty::Ty<'_>, vec_len: usize, no_pointers: usize) -> String {
1420+
fn llvm_vector_str(elem_ty: Ty<'_>, vec_len: usize, no_pointers: usize) -> String {
14211421
let p0s: String = "p0".repeat(no_pointers);
14221422
match elem_ty.sty {
14231423
ty::Int(v) => format!("v{}{}i{}", vec_len, p0s, v.bit_width().unwrap()),
@@ -1427,7 +1427,7 @@ fn generic_simd_intrinsic(
14271427
}
14281428
}
14291429

1430-
fn llvm_vector_ty(cx: &CodegenCx<'ll, '_>, elem_ty: ty::Ty<'_>, vec_len: usize,
1430+
fn llvm_vector_ty(cx: &CodegenCx<'ll, '_>, elem_ty: Ty<'_>, vec_len: usize,
14311431
mut no_pointers: usize) -> &'ll Type {
14321432
// FIXME: use cx.layout_of(ty).llvm_type() ?
14331433
let mut elem_ty = match elem_ty.sty {
@@ -1473,15 +1473,15 @@ fn generic_simd_intrinsic(
14731473
in_ty, ret_ty);
14741474

14751475
// This counts how many pointers
1476-
fn ptr_count(t: ty::Ty<'_>) -> usize {
1476+
fn ptr_count(t: Ty<'_>) -> usize {
14771477
match t.sty {
14781478
ty::RawPtr(p) => 1 + ptr_count(p.ty),
14791479
_ => 0,
14801480
}
14811481
}
14821482

14831483
// Non-ptr type
1484-
fn non_ptr(t: ty::Ty<'_>) -> ty::Ty<'_> {
1484+
fn non_ptr(t: Ty<'_>) -> Ty<'_> {
14851485
match t.sty {
14861486
ty::RawPtr(p) => non_ptr(p.ty),
14871487
_ => t,
@@ -1572,15 +1572,15 @@ fn generic_simd_intrinsic(
15721572
arg_tys[2].simd_size(tcx));
15731573

15741574
// This counts how many pointers
1575-
fn ptr_count(t: ty::Ty<'_>) -> usize {
1575+
fn ptr_count(t: Ty<'_>) -> usize {
15761576
match t.sty {
15771577
ty::RawPtr(p) => 1 + ptr_count(p.ty),
15781578
_ => 0,
15791579
}
15801580
}
15811581

15821582
// Non-ptr type
1583-
fn non_ptr(t: ty::Ty<'_>) -> ty::Ty<'_> {
1583+
fn non_ptr(t: Ty<'_>) -> Ty<'_> {
15841584
match t.sty {
15851585
ty::RawPtr(p) => non_ptr(p.ty),
15861586
_ => t,

src/librustc_codegen_llvm/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#![feature(static_nobundle)]
2323
#![feature(trusted_len)]
2424
#![deny(rust_2018_idioms)]
25+
#![deny(internal)]
2526
#![deny(unused_lifetimes)]
2627
#![allow(explicit_outlives_requirements)]
2728

0 commit comments

Comments
 (0)