diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-05 11:31:42 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-05 11:31:42 +0200 |
| commit | bc62bd55bd4d91ea283d4db0167742d967fa5817 (patch) | |
| tree | 6e79e36cf5036732675211b77f5a7eb333d68093 | |
| parent | 11007c02f70130cdc70b98f0909e5c150a2751a6 (diff) | |
| parent | 69046fa8fdb2505367a4375be78eae5b47e15fe7 (diff) | |
| download | rust-bc62bd55bd4d91ea283d4db0167742d967fa5817.tar.gz rust-bc62bd55bd4d91ea283d4db0167742d967fa5817.zip | |
Sync from rust 949b98cab8a186b98bf87e64374b8d0848c55271
| -rw-r--r-- | example/arbitrary_self_types_pointers_and_wrappers.rs | 2 | ||||
| -rwxr-xr-x | scripts/rustup.sh | 2 | ||||
| -rw-r--r-- | src/driver/aot.rs | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/example/arbitrary_self_types_pointers_and_wrappers.rs b/example/arbitrary_self_types_pointers_and_wrappers.rs index e9876837dd8..d270fec6b71 100644 --- a/example/arbitrary_self_types_pointers_and_wrappers.rs +++ b/example/arbitrary_self_types_pointers_and_wrappers.rs @@ -36,7 +36,7 @@ impl<T: DispatchFromDyn<U>, U> DispatchFromDyn<Wrapper<U>> for Wrapper<T> {} trait Trait { // This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable - // without unsized_locals), but wrappers arond `Self` currently are not. + // without unsized_locals), but wrappers around `Self` currently are not. // FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented // fn wrapper(self: Wrapper<Self>) -> i32; fn ptr_wrapper(self: Ptr<Wrapper<Self>>) -> i32; diff --git a/scripts/rustup.sh b/scripts/rustup.sh index cc34c080886..bc4c06ed7d2 100755 --- a/scripts/rustup.sh +++ b/scripts/rustup.sh @@ -11,7 +11,7 @@ case $1 in sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain rustup component add rustfmt || true - echo "=> Uninstalling all old nighlies" + echo "=> Uninstalling all old nightlies" for nightly in $(rustup toolchain list | grep nightly | grep -v "$TOOLCHAIN" | grep -v nightly-x86_64); do rustup toolchain uninstall "$nightly" done diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 2e047c7eea1..5e1e1c81d26 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -304,8 +304,12 @@ pub(crate) fn run_aot( }; // FIXME handle `-Ctarget-cpu=native` - let target_cpu = - tcx.sess.opts.cg.target_cpu.as_ref().unwrap_or(&tcx.sess.target.cpu).to_owned(); + let target_cpu = match tcx.sess.opts.cg.target_cpu { + Some(ref name) => name, + None => tcx.sess.target.cpu.as_ref(), + } + .to_owned(); + Box::new(( CodegenResults { modules, |
