Skip to content

Commit 11c2a4c

Browse files
committed
push for myself pls ignore my commit msgs im too lazy ok dont judge me thx <3
1 parent bfdcb05 commit 11c2a4c

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

crates/rustc_codegen_nvvm/src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
527527
assert_eq!(place.llextra.is_some(), place.layout.is_unsized());
528528

529529
if place.layout.is_zst() {
530-
return OperandRef::new_zst(self, place.layout);
530+
return OperandRef::zero_sized(place.layout);
531531
}
532532

533533
fn scalar_load_metadata<'a, 'll, 'tcx>(

crates/rustc_codegen_nvvm/src/const_ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
209209
}
210210
}
211211

212+
// removed in nightly 1.72.0 so figure out the consequences if any
212213
// fn from_const_alloc(
213214
// &self,
214215
// layout: TyAndLayout<'tcx>,

crates/rustc_codegen_nvvm/src/debug_info/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn fixed_vec_metadata<'ll, 'tcx>(
398398
let (size, align) = cx.size_and_align_of(array_or_slice_type);
399399

400400
let upper_bound = match array_or_slice_type.kind() {
401-
ty::Array(_, len) => len.eval_usize(cx.tcx, ty::ParamEnv::reveal_all()) as c_longlong,
401+
ty::Array(_, len) => len.eval_target_usize(cx.tcx, ty::ParamEnv::reveal_all()) as c_longlong,
402402
_ => -1,
403403
};
404404

crates/rustc_codegen_nvvm/src/debug_info/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::ty::layout::HasTyCtxt;
1717
use rustc_middle::ty::subst::{GenericArgKind, SubstsRef};
1818
use rustc_middle::ty::{
1919
self, Binder, ExistentialTraitRef, Instance, ParamEnv, PolyExistentialTraitRef, Ty,
20-
TypeFoldable, TypeVisitable,
20+
TypeFoldable, TypeVisitable, TypeVisitableExt,
2121
};
2222
use rustc_session::config::{self, DebugInfo};
2323
use rustc_span::symbol::Symbol;
@@ -425,7 +425,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
425425
ty::Adt(def, ..) if !def.is_box() => {
426426
// Again, only create type information if full debuginfo is enabled
427427
if cx.sess().opts.debuginfo == DebugInfo::Full
428-
&& !impl_self_ty.needs_subst()
428+
&& !impl_self_ty.has_param()
429429
{
430430
Some(type_metadata(cx, impl_self_ty, rustc_span::DUMMY_SP))
431431
} else {

crates/rustc_codegen_nvvm/src/init.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ unsafe fn configure_llvm(sess: &Session) {
7676
};
7777
// Set the llvm "program name" to make usage and invalid argument messages more clear.
7878
// add("rustc -Cllvm-args=\"...\" with", true);
79-
if sess.time_llvm_passes() {
79+
if sess.opts.unstable_opts.time_llvm_passes {
8080
add("-time-passes", false);
8181
}
82-
if sess.print_llvm_passes() {
82+
if sess.opts.unstable_opts.print_llvm_passes {
8383
add("-debug-pass=Structure", false);
8484
}
8585
if !sess.opts.unstable_opts.no_generate_arange_section {

crates/rustc_codegen_nvvm/src/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn link_exe(
181181
allocator: &Option<CompiledModule>,
182182
sess: &Session,
183183
crate_type: CrateType,
184-
out_filename: &OutFileName,
184+
out_filename: &Path,
185185
codegen_results: &CodegenResults,
186186
) -> io::Result<()> {
187187
let mut objects = Vec::new();

crates/rustc_codegen_nvvm/src/mono_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub use rustc_middle::mir::mono::MonoItem;
1111
use rustc_middle::mir::mono::{Linkage, Visibility};
1212
use rustc_middle::ty::layout::FnAbiOf;
1313
use rustc_middle::ty::layout::LayoutOf;
14-
use rustc_middle::ty::{self, Instance, TypeFoldable, TypeVisitable};
14+
use rustc_middle::ty::{self, Instance, TypeFoldable, TypeVisitable, TypeVisitableExt};
1515
use tracing::trace;
1616

1717
pub(crate) fn visibility_to_llvm(linkage: Visibility) -> llvm::Visibility {
@@ -66,7 +66,7 @@ impl<'ll, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'ll, 'tcx> {
6666
linkage,
6767
self.tcx.codegen_fn_attrs(instance.def_id())
6868
);
69-
assert!(!instance.substs.needs_infer());
69+
assert!(!instance.substs.has_infer());
7070

7171
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
7272

0 commit comments

Comments
 (0)