Skip to content

Commit bc62bd5

Browse files
committed
Sync from rust 949b98c
2 parents 11007c0 + 69046fa commit bc62bd5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {}
3636

3737
trait Trait {
3838
// This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable
39-
// without unsized_locals), but wrappers arond `Self` currently are not.
39+
// without unsized_locals), but wrappers around `Self` currently are not.
4040
// FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented
4141
// fn wrapper(self: Wrapper<Self>) -> i32;
4242
fn ptr_wrapper(self: Ptr<Wrapper<Self>>) -> i32;

scripts/rustup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ case $1 in
1111
sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain
1212
rustup component add rustfmt || true
1313

14-
echo "=> Uninstalling all old nighlies"
14+
echo "=> Uninstalling all old nightlies"
1515
for nightly in $(rustup toolchain list | grep nightly | grep -v "$TOOLCHAIN" | grep -v nightly-x86_64); do
1616
rustup toolchain uninstall "$nightly"
1717
done

src/driver/aot.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,12 @@ pub(crate) fn run_aot(
304304
};
305305

306306
// FIXME handle `-Ctarget-cpu=native`
307-
let target_cpu =
308-
tcx.sess.opts.cg.target_cpu.as_ref().unwrap_or(&tcx.sess.target.cpu).to_owned();
307+
let target_cpu = match tcx.sess.opts.cg.target_cpu {
308+
Some(ref name) => name,
309+
None => tcx.sess.target.cpu.as_ref(),
310+
}
311+
.to_owned();
312+
309313
Box::new((
310314
CodegenResults {
311315
modules,

0 commit comments

Comments
 (0)