Skip to content

Update to a newer version of Rust nightly #228

@brandonros

Description

@brandonros

We currently are on nightly-2025-03-02

In order to move up to something such as nightly-2025-06-06, you will need to refactor (at least) this code in rustc_codegen_nvvm due to changes in the Rust minor version (guessing?):

writer"' --cfg 'llvm_component="ipo"' --cfg 'llvm_component="lto"' --cfg 'llvm_component="nvptx"'`
error[E0432]: unresolved import `rustc_target::callconv::Conv`
  --> crates/rustc_codegen_nvvm/src/abi.rs:16:68
   |
16 |     ArgAbi, ArgAttribute, ArgAttributes, ArgExtension, CastTarget, Conv, FnAbi, PassMode,
   |                                                                    ^^^^ no `Conv` in `callconv`

error[E0432]: unresolved imports `rustc_attr_parsing::InlineAttr`, `rustc_attr_parsing::OptimizeAttr`
 --> crates/rustc_codegen_nvvm/src/attributes.rs:4:26
  |
4 | use rustc_attr_parsing::{InlineAttr, OptimizeAttr};
  |                          ^^^^^^^^^^  ^^^^^^^^^^^^ no `OptimizeAttr` in the root
  |                          |
  |                          no `InlineAttr` in the root

error[E0432]: unresolved import `rustc_codegen_ssa::common::AtomicOrdering`
 --> crates/rustc_codegen_nvvm/src/builder.rs:9:33
  |
9 | use rustc_codegen_ssa::common::{AtomicOrdering, IntPredicate, RealPredicate, TypeKind};
  |                                 ^^^^^^^^^^^^^^ no `AtomicOrdering` in `common`
  |
  = help: consider importing one of these enums instead:
          crate::builder::ty::AtomicOrdering
          std::intrinsics::AtomicOrdering
          rustc_middle::ty::AtomicOrdering

error[E0407]: method `arg_memory_ty` is not a member of trait `ArgAbiBuilderMethods`
   --> crates/rustc_codegen_nvvm/src/abi.rs:264:5
    |
264 | /     fn arg_memory_ty(&self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>) -> &'ll Type {
265 | |         arg_abi.memory_ty(self)
266 | |     }
    | |_____^ not a member of trait `ArgAbiBuilderMethods`

error[E0407]: method `is_undef` is not a member of trait `ConstCodegenMethods`
   --> crates/rustc_codegen_nvvm/src/const_ty.rs:251:5
    |
251 | /     fn is_undef(&self, v: Self::Value) -> bool {
252 | |         unsafe { llvm::LLVMIsUndef(v) == True }
253 | |     }
    | |_____^ not a member of trait `ConstCodegenMethods`

error[E0407]: method `add_used_global` is not a member of trait `StaticCodegenMethods`
   --> crates/rustc_codegen_nvvm/src/consts.rs:437:5
    |
437 | /     fn add_used_global(&self, global: &'ll Value) {
438 | |         let cast = unsafe { llvm::LLVMConstPointerCast(global, self.type_i8p()) };
439 | |         self.used_statics.borrow_mut().push(cast);
440 | |     }
    | |_____^ not a member of trait `StaticCodegenMethods`

error[E0407]: method `add_compiler_used_global` is not a member of trait `StaticCodegenMethods`
   --> crates/rustc_codegen_nvvm/src/consts.rs:444:5
    |
444 | /     fn add_compiler_used_global(&self, global: &'ll Value) {
445 | |         let cast = unsafe { llvm::LLVMConstPointerCast(global, self.type_i8p()) };
446 | |         self.compiler_used_statics.borrow_mut().push(cast);
447 | |     }
    | |_____^ not a member of trait `StaticCodegenMethods`

error[E0407]: method `codegen_unit` is not a member of trait `MiscCodegenMethods`
   --> crates/rustc_codegen_nvvm/src/context.rs:236:5
    |
236 | /     fn codegen_unit(&self) -> &'tcx CodegenUnit<'tcx> {
237 | |         self.codegen_unit
238 | |     }
    | |_____^ not a member of trait `MiscCodegenMethods`

error[E0407]: method `get_dbg_loc` is not a member of trait `DebugInfoBuilderMethods`
   --> crates/rustc_codegen_nvvm/src/debug_info/mod.rs:195:5
    |
195 |       fn get_dbg_loc(&self) -> Option<Self::DILocation> {
    |       ^  ----------- help: there is an associated function with a similar name: `set_dbg_loc`
    |  _____|
    | |
196 | |         None // TODO: implement this
197 | |     }
    | |_____^ not a member of trait `DebugInfoBuilderMethods`

error[E0407]: method `type_test` is not a member of trait `IntrinsicCallBuilderMethods`
   --> crates/rustc_codegen_nvvm/src/intrinsic.rs:599:5
    |
599 | /     fn type_test(&mut self, _pointer: &'ll Value, _typeid: &'ll Metadata) -> &'ll Value {
600 | |         // LLVM CFI doesnt make sense on the GPU
601 | |         self.const_i32(0)
602 | |     }
    | |_____^ not a member of trait `IntrinsicCallBuilderMethods`

error[E0422]: cannot find struct, variant or union type `Force` in this scope
  --> crates/rustc_codegen_nvvm/src/attributes.rs:20:9
   |
20 |         Force { .. } => bug!("Force inline should have been inlined away by now"), // TODO: Verify this
   |         ^^^^^ not found in this scope

error[E0412]: cannot find type `AtomicOrdering` in module `rustc_codegen_ssa::common`
   --> crates/rustc_codegen_nvvm/src/builder.rs:708:44
    |
708 |         _order: rustc_codegen_ssa::common::AtomicOrdering,
    |                                            ^^^^^^^^^^^^^^ not found in `rustc_codegen_ssa::common`
    |
help: consider importing one of these enums
    |
1   + use crate::builder::ty::AtomicOrdering;
    |
1   + use rustc_middle::ty::AtomicOrdering;
    |
help: if you import `AtomicOrdering`, refer to it directly
    |
708 -         _order: rustc_codegen_ssa::common::AtomicOrdering,
708 +         _order: AtomicOrdering,
    |

error[E0412]: cannot find type `AtomicOrdering` in module `rustc_codegen_ssa::common`
    --> crates/rustc_codegen_nvvm/src/builder.rs:1045:44
     |
1045 |         _order: rustc_codegen_ssa::common::AtomicOrdering,
     |                                            ^^^^^^^^^^^^^^ not found in `rustc_codegen_ssa::common`
     |
help: consider importing one of these enums
     |
1    + use crate::builder::ty::AtomicOrdering;
     |
1    + use rustc_middle::ty::AtomicOrdering;
     |
help: if you import `AtomicOrdering`, refer to it directly
     |
1045 -         _order: rustc_codegen_ssa::common::AtomicOrdering,
1045 +         _order: AtomicOrdering,
     |

error[E0412]: cannot find type `AtomicOrdering` in module `rustc_codegen_ssa::common`
    --> crates/rustc_codegen_nvvm/src/builder.rs:1046:52
     |
1046 |         _failure_order: rustc_codegen_ssa::common::AtomicOrdering,
     |                                                    ^^^^^^^^^^^^^^ not found in `rustc_codegen_ssa::common`
     |
help: consider importing one of these enums
     |
1    + use crate::builder::ty::AtomicOrdering;
     |
1    + use rustc_middle::ty::AtomicOrdering;
     |
help: if you import `AtomicOrdering`, refer to it directly
     |
1046 -         _failure_order: rustc_codegen_ssa::common::AtomicOrdering,
1046 +         _failure_order: AtomicOrdering,
     |

error[E0412]: cannot find type `AtomicOrdering` in module `rustc_codegen_ssa::common`
    --> crates/rustc_codegen_nvvm/src/builder.rs:1058:44
     |
1058 |         _order: rustc_codegen_ssa::common::AtomicOrdering,
     |                                            ^^^^^^^^^^^^^^ not found in `rustc_codegen_ssa::common`
     |
help: consider importing one of these enums
     |
1    + use crate::builder::ty::AtomicOrdering;
     |
1    + use rustc_middle::ty::AtomicOrdering;
     |
help: if you import `AtomicOrdering`, refer to it directly
     |
1058 -         _order: rustc_codegen_ssa::common::AtomicOrdering,
1058 +         _order: AtomicOrdering,
     |

error[E0412]: cannot find type `AtomicOrdering` in module `rustc_codegen_ssa::common`
    --> crates/rustc_codegen_nvvm/src/builder.rs:1066:44
     |
1066 |         _order: rustc_codegen_ssa::common::AtomicOrdering,
     |                                            ^^^^^^^^^^^^^^ not found in `rustc_codegen_ssa::common`
     |
help: consider importing one of these enums
     |
1    + use crate::builder::ty::AtomicOrdering;
     |
1    + use rustc_middle::ty::AtomicOrdering;
     |
help: if you import `AtomicOrdering`, refer to it directly
     |
1066 -         _order: rustc_codegen_ssa::common::AtomicOrdering,
1066 +         _order: AtomicOrdering,
     |

error[E0422]: cannot find struct, variant or union type `Vector` in this scope
   --> crates/rustc_codegen_nvvm/src/intrinsic.rs:493:21
    |
493 |                     Vector { .. } => false,
    |                     ^^^^^^ not found in this scope
    |
help: consider importing one of these variants
    |
1   + use crate::intrinsic::abi::RegKind::Vector;
    |
1   + use crate::llvm::TypeKind::Vector;
    |
1   + use rustc_abi::RegKind::Vector;
    |
1   + use rustc_codegen_ssa::common::TypeKind::Vector;
    |

error[E0635]: unknown feature `hash_raw_entry`
 --> crates/rustc_codegen_nvvm/src/lib.rs:6:12
  |
6 | #![feature(hash_raw_entry)]
  |            ^^^^^^^^^^^^^^

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> crates/rustc_codegen_nvvm/src/abi.rs:545:12
    |
545 | impl<'tcx> AbiBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> {
    |            ^^^^^^^^^^^^^^^^^------ help: remove the unnecessary generics
    |            |
    |            expected 0 lifetime arguments

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
  --> crates/rustc_codegen_nvvm/src/const_ty.rs:18:17
   |
18 | impl<'ll, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
   |                 ^^^^^^^^^^^^^^^^^^^------ help: remove the unnecessary generics
   |                 |
   |                 expected 0 lifetime arguments

error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> crates/rustc_codegen_nvvm/src/ty.rs:161:17
    |
161 | impl<'ll, 'tcx> BaseTypeCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
    |                 ^^^^^^^^^^^^^^^^^^^^^^------ help: remove the unnecessary generics
    |                 |
    |                 expected 0 lifetime arguments

error[E0053]: method `codegen_global_asm` has an incompatible type for trait
   --> crates/rustc_codegen_nvvm/src/asm.rs:226:9
    |
226 |         &self,
    |         ^^^^^ types differ in mutability
    |
    = note: expected signature `fn(&mut CodegenCx<'_, '_>, &_, &[GlobalAsmOperandRef<'tcx>], InlineAsmOptions, &_)`
               found signature `fn(&CodegenCx<'_, '_>, &_, &[GlobalAsmOperandRef<'_>], InlineAsmOptions, &_)`
help: change the self-receiver type to match the trait
    |
226 |         &mut self,
    |          +++

error[E0053]: method `codegen_static` has an incompatible type for trait
   --> crates/rustc_codegen_nvvm/src/consts.rs:340:23
    |
340 |     fn codegen_static(&self, def_id: DefId) {
    |                       ^^^^^ types differ in mutability
    |
    = note: expected signature `fn(&mut CodegenCx<'_, '_>, rustc_span::def_id::DefId)`
               found signature `fn(&CodegenCx<'_, '_>, rustc_span::def_id::DefId)`
help: change the self-receiver type to match the trait
    |
340 |     fn codegen_static(&mut self, def_id: DefId) {
    |                        +++

error[E0050]: method `codegen_intrinsic_call` has 6 parameters but the declaration in trait `codegen_intrinsic_call` has 5
   --> crates/rustc_codegen_nvvm/src/intrinsic.rs:160:9
    |
160 | /         &mut self,
161 | |         instance: ty::Instance<'tcx>,
162 | |         fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
163 | |         args: &[OperandRef<'tcx, &'ll Value>],
164 | |         llresult: &'ll Value,
165 | |         span: Span,
    | |__________________^ expected 5 parameters, found 6
    |
    = note: `codegen_intrinsic_call` from trait: `fn(&mut Self, Instance<'tcx>, &[OperandRef<'tcx, <Self as rustc_codegen_ssa::traits::BackendTypes>::Value>], rustc_codegen_ssa::mir::place::PlaceRef<'tcx, <Self as rustc_codegen_ssa::traits::BackendTypes>::Value>, rustc_span::Span) -> Result<(), Instance<'tcx>>`

error[E0053]: method `predefine_static` has an incompatible type for trait
  --> crates/rustc_codegen_nvvm/src/mono_item.rs:26:9
   |
26 |         &self,
   |         ^^^^^ types differ in mutability
   |
   = note: expected signature `fn(&mut CodegenCx<'_, '_>, rustc_span::def_id::DefId, rustc_middle::mir::mono::Linkage, rustc_middle::mir::mono::Visibility, &_)`
              found signature `fn(&CodegenCx<'_, '_>, rustc_span::def_id::DefId, rustc_middle::mir::mono::Linkage, rustc_middle::mir::mono::Visibility, &_)`
help: change the self-receiver type to match the trait
   |
26 |         &mut self,
   |          +++

error[E0053]: method `predefine_fn` has an incompatible type for trait
  --> crates/rustc_codegen_nvvm/src/mono_item.rs:56:9
   |
56 |         &self,
   |         ^^^^^ types differ in mutability
   |
   = note: expected signature `fn(&mut CodegenCx<'_, '_>, Instance<'_>, rustc_middle::mir::mono::Linkage, rustc_middle::mir::mono::Visibility, &_)`
              found signature `fn(&CodegenCx<'_, '_>, Instance<'_>, rustc_middle::mir::mono::Linkage, rustc_middle::mir::mono::Visibility, &_)`
help: change the self-receiver type to match the trait
   |
56 |         &mut self,
   |          +++

error[E0053]: method `optimize` has an incompatible type for trait
   --> crates/rustc_codegen_nvvm/src/lib.rs:248:5
    |
248 | /     unsafe fn optimize(
249 | |         cgcx: &CodegenContext<Self>,
250 | |         diag_handler: DiagCtxtHandle<'_>,
251 | |         module: &mut ModuleCodegen<Self::Module>,
252 | |         config: &ModuleConfig,
253 | |     ) -> Result<(), FatalError> {
    | |_______________________________^ expected safe fn, found unsafe fn
    |
    = note: expected signature `fn(&CodegenContext<_>, DiagCtxtHandle<'_>, &mut ModuleCodegen<_>, &ModuleConfig) -> Result<_, _>`
               found signature `unsafe fn(&CodegenContext<_>, DiagCtxtHandle<'_>, &mut ModuleCodegen<_>, &ModuleConfig) -> Result<_, _>`

error[E0053]: method `optimize_thin` has an incompatible type for trait
   --> crates/rustc_codegen_nvvm/src/lib.rs:257:5
    |
257 | /     unsafe fn optimize_thin(
258 | |         cgcx: &CodegenContext<Self>,
259 | |         thin_module: ThinModule<Self>,
260 | |     ) -> Result<ModuleCodegen<Self::Module>, FatalError> {
    | |________________________________________________________^ expected safe fn, found unsafe fn
    |
    = note: expected signature `fn(&CodegenContext<_>, ThinModule<_>) -> Result<_, _>`
               found signature `unsafe fn(&CodegenContext<_>, ThinModule<_>) -> Result<_, _>`

error[E0053]: method `codegen` has an incompatible type for trait
   --> crates/rustc_codegen_nvvm/src/lib.rs:264:5
    |
264 | /     unsafe fn codegen(
265 | |         cgcx: &CodegenContext<Self>,
266 | |         diag_handler: DiagCtxtHandle<'_>,
267 | |         module: ModuleCodegen<Self::Module>,
268 | |         config: &ModuleConfig,
269 | |     ) -> Result<CompiledModule, FatalError> {
    | |___________________________________________^ expected safe fn, found unsafe fn
    |
    = note: expected signature `fn(&CodegenContext<_>, DiagCtxtHandle<'_>, ModuleCodegen<_>, &ModuleConfig) -> Result<_, _>`
               found signature `unsafe fn(&CodegenContext<_>, DiagCtxtHandle<'_>, ModuleCodegen<_>, &ModuleConfig) -> Result<_, _>`

error[E0599]: no method named `temp_path` found for struct `Arc<OutputFilenames>` in the current scope
   --> crates/rustc_codegen_nvvm/src/back.rs:186:10
    |
184 |       let out = cgcx
    |  _______________-
185 | |         .output_filenames
186 | |         .temp_path(OutputType::Object, module_name);
    | |_________-^^^^^^^^^
    |
help: there is a method `temp_path_for_cgu` with a similar name, but with different arguments
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_session/src/config.rs:1192:5

error[E0599]: no method named `temp_path` found for struct `Arc<OutputFilenames>` in the current scope
   --> crates/rustc_codegen_nvvm/src/back.rs:197:14
    |
195 |           let out = cgcx
    |  ___________________-
196 | |             .output_filenames
197 | |             .temp_path(OutputType::LlvmAssembly, module_name);
    | |_____________-^^^^^^^^^
    |
help: there is a method `temp_path_for_cgu` with a similar name, but with different arguments
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_session/src/config.rs:1192:5

error[E0063]: missing field `links_from_incr_cache` in initializer of `CompiledModule`
   --> crates/rustc_codegen_nvvm/src/back.rs:227:8
    |
227 |     Ok(CompiledModule {
    |        ^^^^^^^^^^^^^^ missing `links_from_incr_cache`

error[E0061]: this method takes 4 arguments but 3 arguments were supplied
   --> crates/rustc_codegen_nvvm/src/back.rs:273:27
    |
273 |                 mono_item.predefine::<Builder<'_, '_, '_>>(&cx, linkage, visibility);
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---  ------- argument #2 of type `&str` is missing
    |                                                            |
    |                                                            types differ in mutability
    |
    = note: expected mutable reference `&mut CodegenCx<'_, '_>`
                       found reference `&CodegenCx<'_, '_>`
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/mono_item.rs:17:8
help: provide the argument
    |
273 -                 mono_item.predefine::<Builder<'_, '_, '_>>(&cx, linkage, visibility);
273 +                 mono_item.predefine::<Builder<'_, '_, '_>>(/* &mut CodegenCx<'_, '_> */, /* &str */, linkage, visibility);
    |

error[E0061]: this method takes 3 arguments but 1 argument was supplied
   --> crates/rustc_codegen_nvvm/src/back.rs:281:31
    |
281 |                     mono_item.define::<Builder<'_, '_, '_>>(&cx);
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----
    |                                                            ||
    |                                                            |types differ in mutability
    |                                                            two arguments of type `&str` and `MonoItemData` are missing
    |
    = note: expected mutable reference `&mut CodegenCx<'_, '_>`
                       found reference `&CodegenCx<'_, '_>`
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/mono_item.rs:11:8
help: provide the arguments
    |
281 -                     mono_item.define::<Builder<'_, '_, '_>>(&cx);
281 +                     mono_item.define::<Builder<'_, '_, '_>>(/* &mut CodegenCx<'_, '_> */, /* &str */, /* MonoItemData */);
    |

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> crates/rustc_codegen_nvvm/src/back.rs:288:13
    |
288 |             maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----- argument #2 of type `&CodegenUnit<'_>` is missing
    |
note: function defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/base.rs:493:8
help: provide the argument
    |
288 |             maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx, /* &CodegenUnit<'_> */);
    |                                                                  ++++++++++++++++++++++++

error[E0599]: no method named `temp_path_ext` found for struct `Arc<OutputFilenames>` in the current scope
   --> crates/rustc_codegen_nvvm/src/back.rs:345:14
    |
343 |           let out = cgcx
    |  ___________________-
344 | |             .output_filenames
345 | |             .temp_path_ext("no-opt.bc", module_name);
    | |_____________-^^^^^^^^^^^^^
    |
help: there is a method `temp_path_ext_for_cgu` with a similar name, but with different arguments
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_session/src/config.rs:1213:5

error[E0599]: no method named `raw_entry_mut` found for struct `std::cell::RefMut<'_, HashMap<std::string::String, &'ll llvm::Value, FxBuildHasher>>` in the current scope
    --> crates/rustc_codegen_nvvm/src/const_ty.rs:86:14
     |
83   |           let val = *self
     |  ____________________-
84   | |             .const_cstr_cache
85   | |             .borrow_mut()
86   | |             .raw_entry_mut()
     | |_____________-^^^^^^^^^^^^^
     |
help: there is a method `get_mut` with a similar name, but with different arguments
    --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs:1167:5
     |
1167 | /     pub fn get_mut<Q: ?Sized>(&mut self, k: &Q) -> Option<&mut V>
1168 | |     where
1169 | |         K: Borrow<Q>,
1170 | |         Q: Hash + Eq,
     | |_____________________^

error[E0599]: no associated item named `USED` found for struct `CodegenFnAttrFlags` in the current scope
   --> crates/rustc_codegen_nvvm/src/consts.rs:429:57
    |
429 |             if attrs.flags.contains(CodegenFnAttrFlags::USED) {
    |                                                         ^^^^ associated item not found in `CodegenFnAttrFlags`

error[E0599]: no method named `add_used_global` found for reference `&CodegenCx<'ll, '_>` in the current scope
   --> crates/rustc_codegen_nvvm/src/consts.rs:430:22
    |
430 |                 self.add_used_global(g);
    |                      ^^^^^^^^^^^^^^^
    |
help: there is a method `define_global` with a similar name, but with different arguments
   --> crates/rustc_codegen_nvvm/src/context.rs:357:5
    |
357 | /     pub fn define_global(
358 | |         &self,
359 | |         name: &str,
360 | |         ty: &'ll Type,
361 | |         address_space: AddressSpace,
362 | |     ) -> Option<&'ll Value> {
    | |___________________________^

error[E0308]: mismatched types
   --> crates/rustc_codegen_nvvm/src/debug_info/metadata/enums.rs:192:53
    |
192 |                 .coroutine_layout(coroutine_def_id, coroutine_args.as_coroutine().kind_ty())
    |                  ----------------                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&RawList<(), GenericArg<'_>>`, found `Ty<'_>`
    |                  |
    |                  arguments to this method are incorrect
    |
    = note: expected reference `&rustc_middle::ty::list::RawList<(), rustc_middle::ty::GenericArg<'_>>`
                  found struct `rustc_middle::ty::Ty<'tcx>`
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_middle/src/ty/mod.rs:1950:12

error[E0308]: mismatched types
   --> crates/rustc_codegen_nvvm/src/debug_info/metadata/enums.rs:396:33
    |
396 |                         .offset(tag_field)
    |                          ------ ^^^^^^^^^ expected `usize`, found `FieldIdx`
    |                          |
    |                          arguments to this method are incorrect
    |
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_abi/src/lib.rs:1344:12
help: call `Into::into` on this expression to convert `FieldIdx` into `usize`
    |
396 |                         .offset(tag_field.into())
    |                                          +++++++

error[E0061]: this method takes 4 arguments but 3 arguments were supplied
   --> crates/rustc_codegen_nvvm/src/debug_info/metadata.rs:814:43
    |
814 |         && let Some(f) = output_filenames.split_dwarf_path(
    |                                           ^^^^^^^^^^^^^^^^
...
817 |             Some(codegen_unit_name),
    |             ----------------------- argument #3 of type `&str` is missing
    |
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_session/src/config.rs:1257:12
help: provide the argument
    |
814 -         && let Some(f) = output_filenames.split_dwarf_path(
815 -             tcx.sess.split_debuginfo(),
816 -             tcx.sess.opts.unstable_opts.split_dwarf_kind,
817 -             Some(codegen_unit_name),
818 -         ) {
814 +         && let Some(f) = output_filenames.split_dwarf_path(tcx.sess.split_debuginfo(), tcx.sess.opts.unstable_opts.split_dwarf_kind, /* &str */, Some(codegen_unit_name)) {
    |

error[E0599]: no method named `unpack` found for struct `rustc_middle::ty::GenericArg` in the current scope
   --> crates/rustc_codegen_nvvm/src/debug_info/mod.rs:370:64
    |
370 |                         if let GenericArgKind::Type(ty) = kind.unpack() {
    |                                                                ^^^^^^ method not found in `rustc_middle::ty::GenericArg<'tcx>`

error[E0061]: this method takes 4 arguments but 3 arguments were supplied
   --> crates/rustc_codegen_nvvm/src/link.rs:136:30
    |
136 |                 out_filename.file_for_writing(outputs, OutputType::Exe, None);
    |                              ^^^^^^^^^^^^^^^^                           ---- argument #3 of type `&str` is missing
    |
note: method defined here
   --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_session/src/config.rs:1102:12
help: provide the argument
    |
136 |                 out_filename.file_for_writing(outputs, OutputType::Exe, /* &str */, None);
    |                                                                         +++++++++++

error[E0599]: no method named `raw_data` found for struct `EncodedMetadata` in the current scope
   --> crates/rustc_codegen_nvvm/src/link.rs:190:34
    |
190 |         codegen_results.metadata.raw_data(),
    |                                  ^^^^^^^^ method not found in `EncodedMetadata`

error[E0061]: this function takes 4 arguments but 2 arguments were supplied
  --> crates/rustc_codegen_nvvm/src/override_fns.rs:21:9
   |
21 |         MonoItem::define::<Builder<'_, '_, '_>>(&MonoItem::Fn(func), cx);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------------------
   |                                                |                     |
   |                                                |                     types differ in mutability
   |                                                two arguments of type `&str` and `MonoItemData` are missing
   |
   = note: expected mutable reference `&mut CodegenCx<'_, '_>`
                      found reference `&CodegenCx<'_, 'tcx>`
note: method defined here
  --> /root/.rustup/toolchains/nightly-2025-06-06-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_codegen_ssa/src/mono_item.rs:11:8
help: provide the arguments
   |
21 -         MonoItem::define::<Builder<'_, '_, '_>>(&MonoItem::Fn(func), cx);
21 +         MonoItem::define::<Builder<'_, '_, '_>>(&MonoItem::Fn(func), /* &mut CodegenCx<'_, '_> */, /* &str */, /* MonoItemData */);
   |

error[E0599]: no variant named `Vector` found for enum `BackendRepr`
   --> crates/rustc_codegen_nvvm/src/ty.rs:304:51
    |
304 |             BackendRepr::Scalar(_) | BackendRepr::Vector { .. } => true,
    |                                                   ^^^^^^ variant not found in `BackendRepr`

error[E0599]: no variant named `Vector` found for enum `BackendRepr`
   --> crates/rustc_codegen_nvvm/src/ty.rs:313:51
    |
313 |             BackendRepr::Scalar(_) | BackendRepr::Vector { .. } | BackendRepr::Memory { .. } => {
    |                                                   ^^^^^^ variant not found in `BackendRepr`

error[E0599]: no variant named `Vector` found for enum `BackendRepr`
   --> crates/rustc_codegen_nvvm/src/ty.rs:519:22
    |
519 |         BackendRepr::Vector { element, count } => {
    |                      ^^^^^^ variant not found in `BackendRepr`

Some errors have detailed explanations: E0050, E0053, E0061, E0063, E0107, E0308, E0407, E0412, E0422...
For more information about an error, try `rustc --explain E0050`.
error: could not compile `rustc_codegen_nvvm` (lib) due to 49 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions