Skip to content

Commit

Permalink
Auto merge of rust-lang#3375 - rust-lang:rustup-2024-03-12, r=oli-obk
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Mar 12, 2024
2 parents 7a5b6eb + 19378ca commit 9b6a6b8
Show file tree
Hide file tree
Showing 1,351 changed files with 19,370 additions and 10,689 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ jobs:
- name: dist-x86_64-apple
env:
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin"
RUST_CONFIGURE_ARGS: "--enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1"
RUSTC_RETRY_LINKER_ON_SEGFAULT: 1
MACOSX_DEPLOYMENT_TARGET: 10.12
SELECT_XCODE: /Applications/Xcode_14.3.1.app
Expand Down Expand Up @@ -442,7 +442,7 @@ jobs:
os: windows-2019-8core-32gb
- name: dist-x86_64-msvc
env:
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler"
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=x86_64-pc-windows-msvc --target=x86_64-pc-windows-msvc --enable-full-tools --enable-profiler --set rust.codegen-units=1"
SCRIPT: python x.py build --set rust.debug=true opt-dist && PGO_HOST=x86_64-pc-windows-msvc ./build/x86_64-pc-windows-msvc/stage0-tools-bin/opt-dist windows-ci -- python x.py dist bootstrap --include-default-paths
DIST_REQUIRE_ALL_TOOLS: 1
os: windows-2019-8core-32gb
Expand Down
14 changes: 14 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2265,6 +2265,17 @@ checksum = "f9d642685b028806386b2b6e75685faadd3eb65a85fff7df711ce18446a422da"
name = "lld-wrapper"
version = "0.1.0"

[[package]]
name = "llvm-bitcode-linker"
version = "0.0.1"
dependencies = [
"anyhow",
"clap",
"thiserror",
"tracing",
"tracing-subscriber",
]

[[package]]
name = "lock_api"
version = "0.4.11"
Expand Down Expand Up @@ -3298,6 +3309,9 @@ dependencies = [
[[package]]
name = "run_make_support"
version = "0.0.0"
dependencies = [
"wasmparser",
]

[[package]]
name = "rust-demangler"
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ members = [
"src/tools/expand-yaml-anchors",
"src/tools/jsondocck",
"src/tools/jsondoclint",
"src/tools/llvm-bitcode-linker",
"src/tools/html-checker",
"src/tools/bump-stage0",
"src/tools/replace-version-placeholder",
Expand Down
20 changes: 13 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ toolchain.

1. Download the latest [MSYS2 installer][msys2] and go through the installer.

2. Download and install [Git for Windows](https://git-scm.com/download/win).
Make sure that it's in your Windows PATH. To enable access to it from within
MSYS2, edit the relevant `mingw[32|64].ini` file in your MSYS2 installation
directory and uncomment the line `MSYS2_PATH_TYPE=inherit`.

You could install and use MSYS2's version of git instead with `pacman`,
however this is not recommended as it's excrutiatingly slow, and not frequently
tested for compatability.

2. Start a MINGW64 or MINGW32 shell (depending on whether you want 32-bit
or 64-bit Rust) either from your start menu, or by running `mingw64.exe`
or `mingw32.exe` from your MSYS2 installation directory (e.g. `C:\msys64`).
Expand All @@ -160,8 +169,7 @@ toolchain.
# Note that it is important that you do **not** use the 'python2', 'cmake',
# and 'ninja' packages from the 'msys2' subsystem.
# The build has historically been known to fail with these packages.
pacman -S git \
make \
pacman -S make \
diffutils \
tar \
mingw-w64-x86_64-python \
Expand All @@ -176,11 +184,9 @@ toolchain.
python x.py setup dist && python x.py build && python x.py install
```

If you want to use the native versions of Git, Python, or CMake you can remove
them from the above pacman command and install them from another source. Make
sure that they're in your Windows PATH, and edit the relevant `mingw[32|64].ini`
file in your MSYS2 installation directory by uncommenting the line
`MSYS2_PATH_TYPE=inherit` to include them in your MSYS2 PATH.
If you want to try the native Windows versions of Python or CMake, you can remove
them from the above pacman command and install them from another source. Follow
the instructions in step 2 to get them on PATH.

Using Windows native Python can be helpful if you get errors when building LLVM.
You may also want to use Git for Windows, as it is often *much* faster. Turning
Expand Down
62 changes: 31 additions & 31 deletions compiler/rustc_ast_lowering/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use rustc_errors::{
codes::*, AddToDiagnostic, Diag, DiagArgFromDisplay, EmissionGuarantee, SubdiagMessageOp,
codes::*, Diag, DiagArgFromDisplay, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic,
};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::{symbol::Ident, Span, Symbol};

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_generic_type_with_parentheses, code = E0214)]
pub struct GenericTypeWithParentheses {
#[primary_span]
Expand All @@ -14,7 +14,7 @@ pub struct GenericTypeWithParentheses {
pub sub: Option<UseAngleBrackets>,
}

#[derive(Clone, Copy, Subdiagnostic)]
#[derive(Subdiagnostic)]
#[multipart_suggestion(ast_lowering_use_angle_brackets, applicability = "maybe-incorrect")]
pub struct UseAngleBrackets {
#[suggestion_part(code = "<")]
Expand All @@ -40,8 +40,8 @@ pub struct InvalidAbi {

pub struct InvalidAbiReason(pub &'static str);

impl AddToDiagnostic for InvalidAbiReason {
fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
impl Subdiagnostic for InvalidAbiReason {
fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
self,
diag: &mut Diag<'_, G>,
_: F,
Expand All @@ -63,7 +63,7 @@ pub struct InvalidAbiSuggestion {
pub suggestion: String,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_assoc_ty_parentheses)]
pub struct AssocTyParentheses {
#[primary_span]
Expand All @@ -72,7 +72,7 @@ pub struct AssocTyParentheses {
pub sub: AssocTyParenthesesSub,
}

#[derive(Clone, Copy, Subdiagnostic)]
#[derive(Subdiagnostic)]
pub enum AssocTyParenthesesSub {
#[multipart_suggestion(ast_lowering_remove_parentheses)]
Empty {
Expand Down Expand Up @@ -106,23 +106,23 @@ pub struct MisplacedAssocTyBinding {
pub suggestion: Option<Span>,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_underscore_expr_lhs_assign)]
pub struct UnderscoreExprLhsAssign {
#[primary_span]
#[label]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_base_expression_double_dot, code = E0797)]
pub struct BaseExpressionDoubleDot {
#[primary_span]
#[suggestion(code = "/* expr */", applicability = "has-placeholders", style = "verbose")]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_await_only_in_async_fn_and_blocks, code = E0728)]
pub struct AwaitOnlyInAsyncFnAndBlocks {
#[primary_span]
Expand All @@ -132,50 +132,50 @@ pub struct AwaitOnlyInAsyncFnAndBlocks {
pub item_span: Option<Span>,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_coroutine_too_many_parameters, code = E0628)]
pub struct CoroutineTooManyParameters {
#[primary_span]
pub fn_decl_span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_closure_cannot_be_static, code = E0697)]
pub struct ClosureCannotBeStatic {
#[primary_span]
pub fn_decl_span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_functional_record_update_destructuring_assignment)]
pub struct FunctionalRecordUpdateDestructuringAssignment {
#[primary_span]
#[suggestion(code = "", applicability = "machine-applicable")]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_async_coroutines_not_supported, code = E0727)]
pub struct AsyncCoroutinesNotSupported {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_inline_asm_unsupported_target, code = E0472)]
pub struct InlineAsmUnsupportedTarget {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_att_syntax_only_x86)]
pub struct AttSyntaxOnlyX86 {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_abi_specified_multiple_times)]
pub struct AbiSpecifiedMultipleTimes {
#[primary_span]
Expand All @@ -187,7 +187,7 @@ pub struct AbiSpecifiedMultipleTimes {
pub equivalent: Option<()>,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_clobber_abi_not_supported)]
pub struct ClobberAbiNotSupported {
#[primary_span]
Expand All @@ -203,7 +203,7 @@ pub struct InvalidAbiClobberAbi {
pub supported_abis: String,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_invalid_register)]
pub struct InvalidRegister<'a> {
#[primary_span]
Expand All @@ -212,7 +212,7 @@ pub struct InvalidRegister<'a> {
pub error: &'a str,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_invalid_register_class)]
pub struct InvalidRegisterClass<'a> {
#[primary_span]
Expand Down Expand Up @@ -241,7 +241,7 @@ pub enum InvalidAsmTemplateModifierRegClassSub {
DoesNotSupportModifier { class_name: Symbol },
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_invalid_asm_template_modifier_const)]
pub struct InvalidAsmTemplateModifierConst {
#[primary_span]
Expand All @@ -251,7 +251,7 @@ pub struct InvalidAsmTemplateModifierConst {
pub op_span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_invalid_asm_template_modifier_sym)]
pub struct InvalidAsmTemplateModifierSym {
#[primary_span]
Expand All @@ -261,7 +261,7 @@ pub struct InvalidAsmTemplateModifierSym {
pub op_span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_invalid_asm_template_modifier_label)]
pub struct InvalidAsmTemplateModifierLabel {
#[primary_span]
Expand All @@ -271,15 +271,15 @@ pub struct InvalidAsmTemplateModifierLabel {
pub op_span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_register_class_only_clobber)]
pub struct RegisterClassOnlyClobber {
#[primary_span]
pub op_span: Span,
pub reg_class_name: Symbol,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_register_conflict)]
pub struct RegisterConflict<'a> {
#[primary_span]
Expand All @@ -293,7 +293,7 @@ pub struct RegisterConflict<'a> {
pub in_out: Option<Span>,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[help]
#[diag(ast_lowering_sub_tuple_binding)]
pub struct SubTupleBinding<'a> {
Expand All @@ -311,7 +311,7 @@ pub struct SubTupleBinding<'a> {
pub ctx: &'a str,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_extra_double_dot)]
pub struct ExtraDoubleDot<'a> {
#[primary_span]
Expand All @@ -322,15 +322,15 @@ pub struct ExtraDoubleDot<'a> {
pub ctx: &'a str,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[note]
#[diag(ast_lowering_misplaced_double_dot)]
pub struct MisplacedDoubleDot {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_misplaced_relax_trait_bound)]
pub struct MisplacedRelaxTraitBound {
#[primary_span]
Expand Down Expand Up @@ -363,14 +363,14 @@ pub struct NeverPatternWithGuard {
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_arbitrary_expression_in_pattern)]
pub struct ArbitraryExpressionInPattern {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[derive(Diagnostic)]
#[diag(ast_lowering_inclusive_range_with_no_end)]
pub struct InclusiveRangeWithNoEnd {
#[primary_span]
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_ast_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use rustc_ast::ParamKindOrd;
use rustc_errors::{
codes::*, AddToDiagnostic, Applicability, Diag, EmissionGuarantee, SubdiagMessageOp,
codes::*, Applicability, Diag, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic,
};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::{symbol::Ident, Span, Symbol};
Expand Down Expand Up @@ -373,8 +373,8 @@ pub struct ArgsBeforeConstraint {
pub struct EmptyLabelManySpans(pub Vec<Span>);

// The derive for `Vec<Span>` does multiple calls to `span_label`, adding commas between each
impl AddToDiagnostic for EmptyLabelManySpans {
fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
impl Subdiagnostic for EmptyLabelManySpans {
fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
self,
diag: &mut Diag<'_, G>,
_: F,
Expand Down Expand Up @@ -742,8 +742,8 @@ pub struct StableFeature {
pub since: Symbol,
}

impl AddToDiagnostic for StableFeature {
fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
impl Subdiagnostic for StableFeature {
fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>(
self,
diag: &mut Diag<'_, G>,
_: F,
Expand Down
Loading

0 comments on commit 9b6a6b8

Please sign in to comment.