Skip to content

Commit 43431e4

Browse files
committed
Update to nightly-2023-08-12
1 parent 8a160d6 commit 43431e4

File tree

9 files changed

+13
-14
lines changed

9 files changed

+13
-14
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_sysroot/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["bjorn3 <bjorn3@users.noreply.github.com>"]
33
name = "sysroot"
44
version = "0.0.0"
5+
resolver = "2"
56

67
[dependencies]
78
core = { path = "./sysroot_src/library/core" }

example/alloc_example.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
22
#![no_std]
3+
#![allow(internal_features)]
34

45
extern crate alloc;
56
extern crate alloc_system;

example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
44
#![feature(rustc_attrs)]
5+
#![allow(internal_features)]
56

67
use std::{
78
ops::{Deref, CoerceUnsized, DispatchFromDyn},

example/mini_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
thread_local
55
)]
66
#![no_core]
7-
#![allow(dead_code)]
7+
#![allow(dead_code, internal_features)]
88

99
#[no_mangle]
1010
unsafe extern "C" fn _Unwind_Resume() {

example/mini_core_hello_world.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
extern_types, thread_local
66
)]
77
#![no_core]
8-
#![allow(dead_code, non_camel_case_types)]
8+
#![allow(dead_code, internal_features, non_camel_case_types)]
99

1010
extern crate mini_core;
1111

example/mod_bench.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(start, core_intrinsics, lang_items)]
22
#![no_std]
3+
#![allow(internal_features)]
34

45
#[link(name = "c")]
56
extern {}

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2023-06-19"
2+
channel = "nightly-2023-08-12"
33
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

src/builder.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,9 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
247247
}
248248

249249
fn check_store(&mut self, val: RValue<'gcc>, ptr: RValue<'gcc>) -> RValue<'gcc> {
250-
let dest_ptr_ty = self.cx.val_ty(ptr).make_pointer(); // TODO(antoyo): make sure make_pointer() is okay here.
251250
let stored_ty = self.cx.val_ty(val);
252251
let stored_ptr_ty = self.cx.type_ptr_to(stored_ty);
253-
254-
if dest_ptr_ty == stored_ptr_ty {
255-
ptr
256-
}
257-
else {
258-
self.bitcast(ptr, stored_ptr_ty)
259-
}
252+
self.bitcast(ptr, stored_ptr_ty)
260253
}
261254

262255
pub fn current_func(&self) -> Function<'gcc> {
@@ -916,7 +909,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
916909
.add_eval(None, self.context.new_call(None, atomic_store, &[ptr, value, ordering]));
917910
}
918911

919-
fn gep(&mut self, _typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> {
912+
fn gep(&mut self, typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> {
913+
// NOTE: due to opaque pointers now being used, we need to cast here.
914+
let ptr = self.context.new_cast(None, ptr, typ.make_pointer());
920915
let ptr_type = ptr.get_type();
921916
let mut pointee_type = ptr.get_type();
922917
// NOTE: we cannot use array indexing here like in inbounds_gep because array indexing is

0 commit comments

Comments
 (0)