Skip to content

Commit 0995767

Browse files
authored
Merge branch 'master' into embedded-linker
2 parents 355e833 + e919669 commit 0995767

File tree

1,399 files changed

+29248
-15864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,399 files changed

+29248
-15864
lines changed

Diff for: .github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ jobs:
315315
- name: x86_64-gnu-distcheck
316316
os: ubuntu-20.04-8core-32gb
317317
env: {}
318+
- name: x86_64-gnu-llvm-18
319+
env:
320+
RUST_BACKTRACE: 1
321+
os: ubuntu-20.04-8core-32gb
318322
- name: x86_64-gnu-llvm-17
319323
env:
320324
RUST_BACKTRACE: 1

Diff for: Cargo.lock

+17-26
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ version = "0.1.0"
469469

470470
[[package]]
471471
name = "cc"
472-
version = "1.0.79"
472+
version = "1.0.90"
473473
source = "registry+https://github.com/rust-lang/crates.io-index"
474-
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
474+
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
475475

476476
[[package]]
477477
name = "cfg-if"
@@ -784,12 +784,6 @@ dependencies = [
784784
"windows-sys 0.52.0",
785785
]
786786

787-
[[package]]
788-
name = "convert_case"
789-
version = "0.4.0"
790-
source = "registry+https://github.com/rust-lang/crates.io-index"
791-
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
792-
793787
[[package]]
794788
name = "core"
795789
version = "0.0.0"
@@ -1035,10 +1029,8 @@ version = "0.99.17"
10351029
source = "registry+https://github.com/rust-lang/crates.io-index"
10361030
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
10371031
dependencies = [
1038-
"convert_case",
10391032
"proc-macro2",
10401033
"quote",
1041-
"rustc_version",
10421034
"syn 1.0.109",
10431035
]
10441036

@@ -2504,6 +2496,7 @@ dependencies = [
25042496
"regex",
25052497
"rustc_version",
25062498
"smallvec",
2499+
"tempfile",
25072500
"ui_test 0.21.2",
25082501
]
25092502

@@ -3508,7 +3501,7 @@ dependencies = [
35083501
name = "rustc_ast_passes"
35093502
version = "0.0.0"
35103503
dependencies = [
3511-
"itertools 0.11.0",
3504+
"itertools 0.12.1",
35123505
"rustc_ast",
35133506
"rustc_ast_pretty",
35143507
"rustc_attr",
@@ -3528,7 +3521,7 @@ dependencies = [
35283521
name = "rustc_ast_pretty"
35293522
version = "0.0.0"
35303523
dependencies = [
3531-
"itertools 0.11.0",
3524+
"itertools 0.12.1",
35323525
"rustc_ast",
35333526
"rustc_lexer",
35343527
"rustc_span",
@@ -3569,7 +3562,7 @@ name = "rustc_borrowck"
35693562
version = "0.0.0"
35703563
dependencies = [
35713564
"either",
3572-
"itertools 0.11.0",
3565+
"itertools 0.12.1",
35733566
"polonius-engine",
35743567
"rustc_data_structures",
35753568
"rustc_errors",
@@ -3622,7 +3615,7 @@ name = "rustc_codegen_llvm"
36223615
version = "0.0.0"
36233616
dependencies = [
36243617
"bitflags 2.4.2",
3625-
"itertools 0.11.0",
3618+
"itertools 0.12.1",
36263619
"libc",
36273620
"measureme",
36283621
"object",
@@ -3658,7 +3651,7 @@ dependencies = [
36583651
"ar_archive_writer",
36593652
"bitflags 2.4.2",
36603653
"cc",
3661-
"itertools 0.11.0",
3654+
"itertools 0.12.1",
36623655
"jobserver",
36633656
"libc",
36643657
"object",
@@ -3940,7 +3933,7 @@ dependencies = [
39403933
name = "rustc_hir_analysis"
39413934
version = "0.0.0"
39423935
dependencies = [
3943-
"itertools 0.11.0",
3936+
"itertools 0.12.1",
39443937
"rustc_arena",
39453938
"rustc_ast",
39463939
"rustc_attr",
@@ -3979,7 +3972,7 @@ dependencies = [
39793972
name = "rustc_hir_typeck"
39803973
version = "0.0.0"
39813974
dependencies = [
3982-
"itertools 0.11.0",
3975+
"itertools 0.12.1",
39833976
"rustc_ast",
39843977
"rustc_ast_ir",
39853978
"rustc_attr",
@@ -4144,7 +4137,6 @@ dependencies = [
41444137
"rustc_target",
41454138
"rustc_trait_selection",
41464139
"rustc_type_ir",
4147-
"smallvec",
41484140
"tracing",
41494141
"unicode-security",
41504142
]
@@ -4228,7 +4220,6 @@ name = "rustc_middle"
42284220
version = "0.0.0"
42294221
dependencies = [
42304222
"bitflags 2.4.2",
4231-
"derive_more",
42324223
"either",
42334224
"field-offset",
42344225
"gsgdt",
@@ -4266,7 +4257,7 @@ name = "rustc_mir_build"
42664257
version = "0.0.0"
42674258
dependencies = [
42684259
"either",
4269-
"itertools 0.11.0",
4260+
"itertools 0.12.1",
42704261
"rustc_apfloat",
42714262
"rustc_arena",
42724263
"rustc_ast",
@@ -4313,7 +4304,7 @@ name = "rustc_mir_transform"
43134304
version = "0.0.0"
43144305
dependencies = [
43154306
"either",
4316-
"itertools 0.11.0",
4307+
"itertools 0.12.1",
43174308
"rustc_arena",
43184309
"rustc_ast",
43194310
"rustc_attr",
@@ -4393,7 +4384,6 @@ dependencies = [
43934384
name = "rustc_passes"
43944385
version = "0.0.0"
43954386
dependencies = [
4396-
"itertools 0.11.0",
43974387
"rustc_ast",
43984388
"rustc_ast_pretty",
43994389
"rustc_attr",
@@ -4583,6 +4573,7 @@ name = "rustc_span"
45834573
version = "0.0.0"
45844574
dependencies = [
45854575
"indexmap",
4576+
"itoa",
45864577
"md-5",
45874578
"rustc_arena",
45884579
"rustc_data_structures",
@@ -4643,7 +4634,7 @@ name = "rustc_trait_selection"
46434634
version = "0.0.0"
46444635
dependencies = [
46454636
"bitflags 2.4.2",
4646-
"itertools 0.11.0",
4637+
"itertools 0.12.1",
46474638
"rustc_ast",
46484639
"rustc_ast_ir",
46494640
"rustc_attr",
@@ -4683,7 +4674,7 @@ dependencies = [
46834674
name = "rustc_transmute"
46844675
version = "0.0.0"
46854676
dependencies = [
4686-
"itertools 0.11.0",
4677+
"itertools 0.12.1",
46874678
"rustc_ast_ir",
46884679
"rustc_data_structures",
46894680
"rustc_hir",
@@ -4699,7 +4690,7 @@ dependencies = [
46994690
name = "rustc_ty_utils"
47004691
version = "0.0.0"
47014692
dependencies = [
4702-
"itertools 0.11.0",
4693+
"itertools 0.12.1",
47034694
"rustc_ast_ir",
47044695
"rustc_data_structures",
47054696
"rustc_errors",
@@ -4749,7 +4740,7 @@ dependencies = [
47494740
"askama",
47504741
"expect-test",
47514742
"indexmap",
4752-
"itertools 0.11.0",
4743+
"itertools 0.12.1",
47534744
"minifier",
47544745
"once_cell",
47554746
"regex",

Diff for: INSTALL.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ toolchain.
145145

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

148+
2. Download and install [Git for Windows](https://git-scm.com/download/win).
149+
Make sure that it's in your Windows PATH. To enable access to it from within
150+
MSYS2, edit the relevant `mingw[32|64].ini` file in your MSYS2 installation
151+
directory and uncomment the line `MSYS2_PATH_TYPE=inherit`.
152+
153+
You could install and use MSYS2's version of git instead with `pacman`,
154+
however this is not recommended as it's excrutiatingly slow, and not frequently
155+
tested for compatability.
156+
148157
2. Start a MINGW64 or MINGW32 shell (depending on whether you want 32-bit
149158
or 64-bit Rust) either from your start menu, or by running `mingw64.exe`
150159
or `mingw32.exe` from your MSYS2 installation directory (e.g. `C:\msys64`).
@@ -160,8 +169,7 @@ toolchain.
160169
# Note that it is important that you do **not** use the 'python2', 'cmake',
161170
# and 'ninja' packages from the 'msys2' subsystem.
162171
# The build has historically been known to fail with these packages.
163-
pacman -S git \
164-
make \
172+
pacman -S make \
165173
diffutils \
166174
tar \
167175
mingw-w64-x86_64-python \
@@ -176,11 +184,9 @@ toolchain.
176184
python x.py setup dist && python x.py build && python x.py install
177185
```
178186

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

185191
Using Windows native Python can be helpful if you get errors when building LLVM.
186192
You may also want to use Git for Windows, as it is often *much* faster. Turning

Diff for: compiler/rustc_ast/src/ast.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,9 @@ pub enum InlineAsmOperand {
23022302
Sym {
23032303
sym: InlineAsmSym,
23042304
},
2305+
Label {
2306+
block: P<Block>,
2307+
},
23052308
}
23062309

23072310
impl InlineAsmOperand {
@@ -2311,7 +2314,7 @@ impl InlineAsmOperand {
23112314
| Self::Out { reg, .. }
23122315
| Self::InOut { reg, .. }
23132316
| Self::SplitInOut { reg, .. } => Some(reg),
2314-
Self::Const { .. } | Self::Sym { .. } => None,
2317+
Self::Const { .. } | Self::Sym { .. } | Self::Label { .. } => None,
23152318
}
23162319
}
23172320
}

Diff for: compiler/rustc_ast/src/mut_visit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@ pub fn noop_visit_inline_asm<T: MutVisitor>(asm: &mut InlineAsm, vis: &mut T) {
13311331
}
13321332
InlineAsmOperand::Const { anon_const } => vis.visit_anon_const(anon_const),
13331333
InlineAsmOperand::Sym { sym } => vis.visit_inline_asm_sym(sym),
1334+
InlineAsmOperand::Label { block } => vis.visit_block(block),
13341335
}
13351336
}
13361337
}

Diff for: compiler/rustc_ast/src/visit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ pub fn walk_inline_asm<'a, V: Visitor<'a>>(visitor: &mut V, asm: &'a InlineAsm)
823823
try_visit!(visitor.visit_anon_const(anon_const))
824824
}
825825
InlineAsmOperand::Sym { sym } => try_visit!(visitor.visit_inline_asm_sym(sym)),
826+
InlineAsmOperand::Label { block } => try_visit!(visitor.visit_block(block)),
826827
}
827828
}
828829
V::Result::output()

Diff for: compiler/rustc_ast_ir/src/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl VisitorResult for () {
1414
type Residual = !;
1515

1616
#[cfg(not(feature = "nightly"))]
17-
type Residual = core::ops::Infallible;
17+
type Residual = core::convert::Infallible;
1818

1919
fn output() -> Self {}
2020
fn from_residual(_: Self::Residual) -> Self {}

Diff for: compiler/rustc_ast_lowering/messages.ftl

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ ast_lowering_invalid_abi_suggestion = did you mean
8888
ast_lowering_invalid_asm_template_modifier_const =
8989
asm template modifiers are not allowed for `const` arguments
9090
91+
ast_lowering_invalid_asm_template_modifier_label =
92+
asm template modifiers are not allowed for `label` arguments
93+
9194
ast_lowering_invalid_asm_template_modifier_reg_class =
9295
invalid asm template modifier for this register class
9396

Diff for: compiler/rustc_ast_lowering/src/asm.rs

+23-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use crate::{ImplTraitContext, ImplTraitPosition, ParamMode, ResolverAstLoweringE
33
use super::errors::{
44
AbiSpecifiedMultipleTimes, AttSyntaxOnlyX86, ClobberAbiNotSupported,
55
InlineAsmUnsupportedTarget, InvalidAbiClobberAbi, InvalidAsmTemplateModifierConst,
6-
InvalidAsmTemplateModifierRegClass, InvalidAsmTemplateModifierRegClassSub,
7-
InvalidAsmTemplateModifierSym, InvalidRegister, InvalidRegisterClass, RegisterClassOnlyClobber,
8-
RegisterConflict,
6+
InvalidAsmTemplateModifierLabel, InvalidAsmTemplateModifierRegClass,
7+
InvalidAsmTemplateModifierRegClassSub, InvalidAsmTemplateModifierSym, InvalidRegister,
8+
InvalidRegisterClass, RegisterClassOnlyClobber, RegisterConflict,
99
};
1010
use super::LoweringContext;
1111

@@ -237,6 +237,18 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
237237
}
238238
}
239239
}
240+
InlineAsmOperand::Label { block } => {
241+
if !self.tcx.features().asm_goto {
242+
feature_err(
243+
sess,
244+
sym::asm_goto,
245+
*op_sp,
246+
"label operands for inline assembly are unstable",
247+
)
248+
.emit();
249+
}
250+
hir::InlineAsmOperand::Label { block: self.lower_block(block, false) }
251+
}
240252
};
241253
(op, self.lower_span(*op_sp))
242254
})
@@ -296,6 +308,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
296308
op_span: op_sp,
297309
});
298310
}
311+
hir::InlineAsmOperand::Label { .. } => {
312+
self.dcx().emit_err(InvalidAsmTemplateModifierLabel {
313+
placeholder_span,
314+
op_span: op_sp,
315+
});
316+
}
299317
}
300318
}
301319
}
@@ -335,7 +353,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
335353

336354
hir::InlineAsmOperand::Const { .. }
337355
| hir::InlineAsmOperand::SymFn { .. }
338-
| hir::InlineAsmOperand::SymStatic { .. } => {
356+
| hir::InlineAsmOperand::SymStatic { .. }
357+
| hir::InlineAsmOperand::Label { .. } => {
339358
unreachable!("{op:?} is not a register operand");
340359
}
341360
};

0 commit comments

Comments
 (0)