Skip to content

Commit 240c211

Browse files
committed
Auto merge of #121069 - cuviper:beta-next, r=cuviper
[beta] backports - Correct paths for hexagon-unknown-none-elf platform doc #120533 - CI: Use ninja on apple builders #120543 - Correctly check `never_type` feature gating #120552 - Revert unsound libcore changes of 119911 #120562 - Downgrade xcode #120914 r? cuviper
2 parents 3d66104 + 5df5175 commit 240c211

File tree

13 files changed

+238
-467
lines changed

13 files changed

+238
-467
lines changed

.github/workflows/ci.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ jobs:
319319
- name: dist-x86_64-apple
320320
env:
321321
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
322-
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false --set rust.lto=thin"
322+
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin"
323323
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
324324
MACOSX_DEPLOYMENT_TARGET: 10.12
325-
SELECT_XCODE: /Applications/Xcode_13.4.1.app
325+
SELECT_XCODE: /Applications/Xcode_14.3.1.app
326326
NO_LLVM_ASSERTIONS: 1
327327
NO_DEBUG_ASSERTIONS: 1
328328
NO_OVERFLOW_CHECKS: 1
@@ -332,42 +332,44 @@ jobs:
332332
- name: dist-apple-various
333333
env:
334334
SCRIPT: "./x.py dist bootstrap --include-default-paths --host='' --target=aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim"
335-
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
335+
RUST_CONFIGURE_ARGS: "--enable-sanitizers --enable-profiler --set rust.jemalloc"
336336
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
337337
MACOSX_DEPLOYMENT_TARGET: 10.12
338-
SELECT_XCODE: /Applications/Xcode_13.4.1.app
338+
SELECT_XCODE: /Applications/Xcode_14.3.1.app
339339
NO_LLVM_ASSERTIONS: 1
340340
NO_DEBUG_ASSERTIONS: 1
341341
NO_OVERFLOW_CHECKS: 1
342342
os: macos-13
343343
- name: x86_64-apple-1
344344
env:
345345
SCRIPT: "./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc --skip tests/run-make-fulldeps"
346-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
346+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
347347
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
348348
MACOSX_DEPLOYMENT_TARGET: 10.12
349349
MACOSX_STD_DEPLOYMENT_TARGET: 10.12
350+
SELECT_XCODE: /Applications/Xcode_14.3.1.app
350351
NO_LLVM_ASSERTIONS: 1
351352
NO_DEBUG_ASSERTIONS: 1
352353
NO_OVERFLOW_CHECKS: 1
353354
os: macos-13
354355
- name: x86_64-apple-2
355356
env:
356357
SCRIPT: "./x.py --stage 2 test tests/ui tests/rustdoc tests/run-make-fulldeps"
357-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false"
358+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
358359
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
359360
MACOSX_DEPLOYMENT_TARGET: 10.12
360361
MACOSX_STD_DEPLOYMENT_TARGET: 10.12
362+
SELECT_XCODE: /Applications/Xcode_14.3.1.app
361363
NO_LLVM_ASSERTIONS: 1
362364
NO_DEBUG_ASSERTIONS: 1
363365
NO_OVERFLOW_CHECKS: 1
364366
os: macos-13
365367
- name: dist-aarch64-apple
366368
env:
367369
SCRIPT: "./x.py dist bootstrap --include-default-paths --stage 2"
368-
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc --set llvm.ninja=false"
370+
RUST_CONFIGURE_ARGS: "--build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin --enable-full-tools --enable-sanitizers --enable-profiler --disable-docs --set rust.jemalloc"
369371
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
370-
SELECT_XCODE: /Applications/Xcode_13.4.1.app
372+
SELECT_XCODE: /Applications/Xcode_14.3.1.app
371373
USE_XCODE_CLANG: 1
372374
MACOSX_DEPLOYMENT_TARGET: 11.0
373375
MACOSX_STD_DEPLOYMENT_TARGET: 11.0

compiler/rustc_ast_passes/src/feature_gate.rs

+13
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,19 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
362362
}
363363
}
364364

365+
fn visit_generic_args(&mut self, args: &'a ast::GenericArgs) {
366+
// This check needs to happen here because the never type can be returned from a function,
367+
// but cannot be used in any other context. If this check was in `visit_fn_ret_ty`, it
368+
// include both functions and generics like `impl Fn() -> !`.
369+
if let ast::GenericArgs::Parenthesized(generic_args) = args
370+
&& let ast::FnRetTy::Ty(ref ty) = generic_args.output
371+
&& matches!(ty.kind, ast::TyKind::Never)
372+
{
373+
gate!(&self, never_type, ty.span, "the `!` type is experimental");
374+
}
375+
visit::walk_generic_args(self, args);
376+
}
377+
365378
fn visit_expr(&mut self, e: &'a ast::Expr) {
366379
match e.kind {
367380
ast::ExprKind::TryBlock(_) => {

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200
//
201201
// Language features:
202202
// tidy-alphabetical-start
203-
#![cfg_attr(not(bootstrap), feature(is_val_statically_known))]
204203
#![feature(abi_unadjusted)]
205204
#![feature(adt_const_params)]
206205
#![feature(allow_internal_unsafe)]

0 commit comments

Comments
 (0)