Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from rust-lang:master #9

Merged
merged 302 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
302 commits
Select commit Hold shift + click to select a range
548b6e1
add tests for behavior in rfc#3662
EtomicBomb Sep 7, 2024
e80c9ac
rustdoc: use `LocalDefId` for inline stmt
notriddle Aug 30, 2024
6590336
rustdoc: use a single box to store Attributes and ItemKind
notriddle Aug 30, 2024
3de6838
add some FIXME(const-hack)
RalfJung Sep 8, 2024
7f9a541
remove pointless rustc_const_unstable on trait impls
RalfJung Sep 8, 2024
f98ca32
Fix linking error when compiling for 32-bit watchOS
madsmtm Sep 7, 2024
ec11001
run-make-support: Add llvm-pdbutil
nebulark Sep 6, 2024
9df7680
detect incompatible CI LLVM options more precisely
onur-ozkan Aug 30, 2024
23df3a9
remove `check_ci_llvm` usage
onur-ozkan Aug 30, 2024
ea34bb0
print incompatible options even if we don't download
onur-ozkan Aug 30, 2024
018ed9a
fix llvm ThinLTO behaviour
onur-ozkan Aug 30, 2024
13e16a9
use `Config::get_builder_toml` for ci-rustc config parsing
onur-ozkan Aug 30, 2024
7b8cbe4
handle dry-run mode in `Config::get_builder_toml`
onur-ozkan Aug 30, 2024
f7b4f4a
Option, Result: put the &mut variants of 'copied' under the same feat…
RalfJung Sep 8, 2024
fa60ea7
interpret: remove Readable trait, we can use Projectable instead
RalfJung Aug 28, 2024
8ad808d
interpret: make Writeable trait about a to_place operation
RalfJung Aug 28, 2024
85dc22f
interpret: factor out common code for place mutation
RalfJung Aug 29, 2024
cbdcbf0
interpret: reset provenance on typed copies
RalfJung Aug 29, 2024
8cd982c
interpret: reset padding during validation
RalfJung Aug 29, 2024
a241042
clarify comments and names in check_validity_requirement
RalfJung Sep 5, 2024
11bd99d
IntervalSet: add comment about representation
RalfJung Sep 5, 2024
11d51aa
const: make ptr.is_null() stop execution on ambiguity
RalfJung Sep 8, 2024
5f3fdd1
Remove needless returns detected by clippy in libraries
eduardosm Sep 8, 2024
332fa6a
add FIXME(const-hack)
RalfJung Sep 8, 2024
7a3a317
remove const_slice_index annotations, it never had a feature gate anyway
RalfJung Sep 8, 2024
7626015
added support for GNU/Hurd on x86_64
sthibaul Jul 26, 2024
6af470e
Reduce visibilities, and add `warn(unreachable_pub)`.
nnethercote Aug 27, 2024
cd9fd27
Factor out some more repetitive code.
nnethercote Aug 28, 2024
bbe28cf
Remove `serialized_bitcode` from `LtoModuleCodegen`.
nnethercote Sep 5, 2024
085744b
Auto merge of #130036 - weiznich:diagnostic_unstable_tracking, r=comp…
bors Sep 8, 2024
a6735e4
Add an explicit ignore message for "up-to-date" tests
Zalathar Sep 9, 2024
ec6fe4e
Streamline `AbortUnwindingCalls`.
nnethercote Aug 28, 2024
cc09ab3
Simplify `verify_candidate_branch`.
nnethercote Aug 29, 2024
181fbd5
Use `let`/`else` to de-indent `ElaborateBoxDerefs::run_pass`.
nnethercote Sep 8, 2024
4f2588f
Remove an unnecessary `continue`.
nnethercote Aug 30, 2024
9cf90b9
Remove some unnecessary dereferences.
nnethercote Aug 30, 2024
7adde3f
Make `CallSite` non-`Copy`.
nnethercote Aug 30, 2024
751c8b4
Use `LocalDecls` in a couple of places.
nnethercote Aug 30, 2024
5445953
Improve consistency in `LowerIntrinsics`.
nnethercote Sep 3, 2024
acccb39
Print a helpful message if any tests were skipped for being up-to-date
Zalathar Sep 9, 2024
3fe7dd6
Remove unnecessary lifetimes in dataflow structs.
nnethercote Sep 5, 2024
bed91f5
Remove unnecessary lifetime in `PlaceCollector`.
nnethercote Sep 6, 2024
1aafeb2
Remove unnecessary lifetime from `OperandCollector`.
nnethercote Sep 6, 2024
28a6dc4
Rename some lifetimes.
nnethercote Sep 6, 2024
dc62f07
Remove `Gatherer`.
nnethercote Sep 6, 2024
0b032f8
Remove `Elaborator`.
nnethercote Sep 6, 2024
5c35027
Remove unnecessary lifetime from `StorageConflictVisitor`.
nnethercote Sep 6, 2024
0f8efb3
Fix ICE caused by missing span in a region error
gurry Sep 9, 2024
263a3ae
Auto merge of #129788 - onur-ozkan:incompatibility-check-for-llvm, r=…
bors Sep 9, 2024
54672ac
[illumos] enable SIGSEGV handler to detect stack overflows
sunshowers Sep 9, 2024
1ea466b
Rollup merge of #119229 - mati865:update-mingw-toolchain, r=jieyouxu,…
workingjubilee Sep 9, 2024
2cce01e
Rollup merge of #128345 - sthibaul:hurd-amd64, r=Urgau
workingjubilee Sep 9, 2024
4cfb1c3
Rollup merge of #128667 - its-the-shrimp:rustdoc_json_types_rename, r…
workingjubilee Sep 9, 2024
15c7d27
Rollup merge of #129876 - nnethercote:more-sysroot-rustc_codegen_gcc,…
workingjubilee Sep 9, 2024
c21d31a
Rollup merge of #130034 - alexcrichton:fix-some-wasm-component-ld-com…
workingjubilee Sep 9, 2024
97d62ac
Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxu
workingjubilee Sep 9, 2024
fd938c7
Rollup merge of #130068 - madsmtm:deployment-target-test, r=jieyouxu
workingjubilee Sep 9, 2024
09373b9
Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, r=com…
workingjubilee Sep 9, 2024
38520ae
Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubilee
workingjubilee Sep 9, 2024
4a26f3b
Rollup merge of #130090 - RalfJung:result-copied, r=Noratrieb
workingjubilee Sep 9, 2024
a7c5797
Rollup merge of #130092 - zslayton:master, r=jieyouxu
workingjubilee Sep 9, 2024
fad44c4
Rollup merge of #130107 - RalfJung:const-ptr-is-null, r=oli-obk
workingjubilee Sep 9, 2024
2f1cf6f
Rollup merge of #130115 - eduardosm:needless-returns-libs, r=workingj…
workingjubilee Sep 9, 2024
3e01a5d
Rollup merge of #130130 - RalfJung:miri-sync, r=RalfJung
workingjubilee Sep 9, 2024
c33aa86
Do not skip linker configuration for `check` builds
Kobzol Sep 9, 2024
e186cc6
do `PolyFnSig` -> `FnSig` conversion later
folkertdev Sep 9, 2024
1f44f0a
Auto merge of #130133 - workingjubilee:rollup-t5o827k, r=workingjubilee
bors Sep 9, 2024
62d196f
bootstrap/Makefile.in: miri: add missing BOOTSTRAP ARGS
RalfJung Sep 9, 2024
0237899
bootstrap `naked_asm!` for `compiler-builtins`
folkertdev Sep 9, 2024
0b20ffc
Remove needless returns detected by clippy in the compiler
eduardosm Sep 9, 2024
db63611
Helper function for formatting with `LifetimeSuggestionPosition`
GrigorenkoPV Sep 9, 2024
843708a
Add missing `#[allow(missing_docs)]` on hack functions in alloc
Urgau Sep 6, 2024
38e3a57
Auto merge of #130135 - Kobzol:bootstrap-check-linker, r=onur-ozkan
bors Sep 9, 2024
97df8fb
Fix default/minimum deployment target for Aarch64 simulator targets
madsmtm Aug 21, 2024
dd35398
Pass deployment target when linking with cc on Apple targets
madsmtm Aug 21, 2024
65c7090
union padding computation: add fast-path for ZST
RalfJung Sep 9, 2024
a1a8627
Allow `missing_docs` lint on the generated test harness
Urgau Sep 9, 2024
0f9cb07
Add test about missing docs at crate level
Urgau Sep 9, 2024
383f506
adapt a test for llvm 20
krasimirgg Sep 9, 2024
0a70924
fix UB in a test
RalfJung Sep 9, 2024
19b8f9e
use verbose flag as a default value for `rust.verbose-tests`
onur-ozkan Sep 9, 2024
bc70fa2
Stabilize `char::MIN`
okaneco Sep 9, 2024
13ea104
update `rust.verbose-tests` doc in `config.example.toml`
onur-ozkan Sep 9, 2024
d7522d8
Auto merge of #128939 - bjorn3:windows_cg_clif_component, r=albertlar…
bors Sep 9, 2024
8b052ea
Update books
rustbot Sep 9, 2024
99cad12
Fix slice::first_mut docs
Scripter17 Sep 9, 2024
05043a3
add `git_merge_commit_email` into `GitConfig`
onur-ozkan Sep 9, 2024
dc9c5f2
implement `build_helper::git::get_closest_merge_commit`
onur-ozkan Sep 9, 2024
9aa823c
replace `get_closest_merge_base_commit` with `get_closest_merge_commit`
onur-ozkan Sep 9, 2024
667cf22
bump download-ci-llvm-stamp
onur-ozkan Sep 9, 2024
720bd0d
move some const fn out of the const_ptr_as_ref feature
RalfJung Sep 9, 2024
12998c2
handle `GitConfig` for `tools/suggest-tests`
onur-ozkan Sep 9, 2024
e10224a
move const fn with a null check into const_ptr_is_null gate
RalfJung Sep 9, 2024
3e3b148
Rollup merge of #129929 - nnethercote:rustc_mir_transform-cleanups-2,…
matthiaskrgr Sep 9, 2024
ee8fd33
Rollup merge of #130022 - nnethercote:dataflow-borrowck-lifetimes, r=…
matthiaskrgr Sep 9, 2024
1490fe6
Rollup merge of #130064 - folkertdev:fix-issue-129983, r=compiler-errors
matthiaskrgr Sep 9, 2024
2d26ebe
Rollup merge of #130067 - madsmtm:clean-up-fs-test, r=ChrisDenton
matthiaskrgr Sep 9, 2024
3658bfb
Rollup merge of #130131 - Zalathar:up-to-date, r=Kobzol
matthiaskrgr Sep 9, 2024
3b0221b
Rollup merge of #130137 - gurry:master, r=cjgillot
matthiaskrgr Sep 9, 2024
7c109b1
Rollup merge of #130153 - onur-ozkan:verbose-to-verbose-tests, r=Kobzol
matthiaskrgr Sep 9, 2024
72b0f5b
Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviper
matthiaskrgr Sep 9, 2024
a0346bb
Rollup merge of #130158 - rustbot:docs-update, r=ehuss
matthiaskrgr Sep 9, 2024
c2f74c3
Auto merge of #130165 - matthiaskrgr:rollup-fsnmz3t, r=matthiaskrgr
bors Sep 9, 2024
2f1e1be
maint: update docs for change_time ext and doc links
juliusl Sep 9, 2024
d243c8f
compiler: Inform the solver of concurrency
workingjubilee Sep 8, 2024
6d61dfd
rustdoc: add two regression tests
fmease Sep 9, 2024
a0a89e5
chore: removing supporting links in favor of existing doc-comment style
juliusl Sep 9, 2024
8235af0
Improve comment formatting.
nnethercote Aug 27, 2024
48064d4
Inline and remove some functions.
nnethercote Aug 28, 2024
baa16d2
Clarify a comment.
nnethercote Aug 30, 2024
e26692d
Add a useful comment.
nnethercote Sep 3, 2024
51e1c39
Add a useful comment about `PromoteTemps`.
nnethercote Sep 4, 2024
d1c55a3
Use `IndexVec::from_raw` to construct a const `IndexVec`.
nnethercote Sep 4, 2024
7023402
Remove references from some structs.
nnethercote Sep 4, 2024
8949b44
Make `check_live_drops` into a `MirLint`.
nnethercote Sep 5, 2024
712463d
Auto merge of #129789 - notriddle:notriddle/inline-stmt-local, r=Guil…
bors Sep 9, 2024
304b7f8
Auto merge of #129778 - RalfJung:interp-lossy-typed-copy, r=saethlin
bors Sep 10, 2024
1392965
Rollup merge of #128316 - GrigorenkoPV:io_error_a_bit_more, r=dtolnay
workingjubilee Sep 10, 2024
5c91cc5
Rollup merge of #129473 - Urgau:fix-llvm-if-unchanged, r=onur-ozkan
workingjubilee Sep 10, 2024
a4c6104
Rollup merge of #129529 - lqd:stable-new-solver, r=Kobzol
workingjubilee Sep 10, 2024
88a2c62
Rollup merge of #129981 - nnethercote:rm-serialize_bitcode, r=antoyo,…
workingjubilee Sep 10, 2024
2859c24
Rollup merge of #130094 - workingjubilee:concurrency-is-real, r=lcnr
workingjubilee Sep 10, 2024
4680892
Rollup merge of #130132 - sunshowers:illumos-sigsegv, r=Noratrieb
workingjubilee Sep 10, 2024
57273d8
Rollup merge of #130146 - folkertdev:bootstrap-naked-asm, r=Amanieu
workingjubilee Sep 10, 2024
68ae3b2
Rollup merge of #130149 - GrigorenkoPV:lifetime-suggestion, r=cjgillot
workingjubilee Sep 10, 2024
a26c809
Rollup merge of #130152 - krasimirgg:nsan, r=nikic
workingjubilee Sep 10, 2024
ca3f4ae
Rollup merge of #130162 - onur-ozkan:bump-ci-llvm-stamp, r=Kobzol
workingjubilee Sep 10, 2024
9749a98
Rollup merge of #130164 - RalfJung:const_ptr_as_ref, r=dtolnay
workingjubilee Sep 10, 2024
d2309c2
Ban non-array SIMD
scottmcm Aug 22, 2024
24c5050
Fix the examples in cg_clif
scottmcm Aug 23, 2024
51d0f68
Update the MIRI tests
scottmcm Aug 23, 2024
26b2b8d
Auto merge of #130179 - workingjubilee:rollup-l78cv44, r=workingjubilee
bors Sep 10, 2024
bdda4ec
Bump unicode_data to version 16.0.0
Marcondiro Sep 10, 2024
c8d9bd4
Bump unicode printable to version 16.0.0
Marcondiro Sep 10, 2024
96d545a
coverage: Avoid referring to "coverage spans" in counter creation
Zalathar Sep 10, 2024
8be70c7
coverage: Avoid referring to out-edges as "branches"
Zalathar Sep 10, 2024
10cd5e8
coverage: Avoid referring to "operands" in counter creation
Zalathar Sep 10, 2024
f827364
Auto merge of #129337 - EtomicBomb:rfc, r=notriddle
bors Sep 10, 2024
8607575
abi/compatibility test: remove tests inside repr(C) wrappers
RalfJung Sep 10, 2024
6ca5ec7
disallow `naked_asm!` outside of `#[naked]` functions
folkertdev Sep 10, 2024
7a57a74
generalize: track relevant info in cache key
lcnr Sep 10, 2024
33855f8
Auto merge of #130025 - Urgau:missing_docs-expect, r=petrochenkov
bors Sep 10, 2024
713828d
Add test for S_OBJNAME and update test for LF_BUILDINFO cl and cmd for
nebulark Sep 6, 2024
34c935b
Rollup merge of #130143 - RalfJung:miri-test-libstd, r=compiler-errors
matthiaskrgr Sep 10, 2024
a204f87
Rollup merge of #130173 - fmease:rustdoc-regression-tests, r=notriddle
matthiaskrgr Sep 10, 2024
accd77e
Rollup merge of #130175 - nnethercote:rustc_mir_transform-cleanups-3,…
matthiaskrgr Sep 10, 2024
98222a5
Rollup merge of #130184 - Zalathar:counters, r=compiler-errors
matthiaskrgr Sep 10, 2024
a42d67e
Rollup merge of #130185 - RalfJung:abi-compat-repr-c-wrappers, r=comp…
matthiaskrgr Sep 10, 2024
35ce85e
handle `GitConfig` for `tools/compiletest`
onur-ozkan Sep 9, 2024
0a7f9e2
skip formatting if no files have been modified
onur-ozkan Sep 9, 2024
3810386
Add -Z small-data-threshold
paulmenage Sep 10, 2024
f93df1f
rescope temp lifetime in let-chain into IfElse
dingxiangfei2009 Jan 24, 2023
e2120a7
coalesce lint suggestions that can intersect
dingxiangfei2009 Sep 5, 2024
89682a5
downgrade borrowck suggestion level due to possible span conflict
dingxiangfei2009 Sep 10, 2024
0ee7cb5
Auto merge of #130200 - matthiaskrgr:rollup-2g4ijc5, r=matthiaskrgr
bors Sep 10, 2024
d104ded
interpret: mark some hot functions inline(always)
RalfJung Sep 10, 2024
4cecf42
Report the `note` when specified in `diagnostic::on_unimplemented`
FedericoBruzzone Sep 8, 2024
8f81597
Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`
GrigorenkoPV Sep 10, 2024
49b3df9
Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`
GrigorenkoPV Sep 10, 2024
4198594
Clarify docs for std::collections
root-goblin Sep 1, 2024
6f7229c
Auto merge of #129403 - scottmcm:only-array-simd, r=compiler-errors
bors Sep 10, 2024
180eace
these tests seem to work fine on i586 these days
RalfJung Aug 31, 2024
c40ee79
move float tests into their own dir
workingjubilee Sep 10, 2024
3daa951
enable and extend float-classify test
RalfJung Aug 31, 2024
e556c13
clean up internal comments about float semantics
RalfJung Aug 31, 2024
7c692e1
Update LLVM to 19 327ca6c
DianQK Sep 10, 2024
a9fb00b
Auto merge of #129975 - notriddle:notriddle/lint-skip, r=GuillaumeGomez
bors Sep 11, 2024
4c5fc2c
Auto merge of #130050 - cjgillot:expect-attr-id, r=fee1-dead
bors Sep 11, 2024
5f32717
document the new git logic in more detail
onur-ozkan Sep 10, 2024
b44f1dd
update stdarch
RalfJung Aug 28, 2024
5a2dd7d
Auto merge of #130194 - lcnr:generalize-cache, r=compiler-errors
bors Sep 11, 2024
542a6c6
miri: support vector index arguments in simd_shuffle
RalfJung Sep 11, 2024
6eddbb7
Fix false positive with `missing_docs` and `#[test]`
ogoffart Sep 11, 2024
9566163
Make SearchPath::new public
Sep 11, 2024
5d456df
Use `#[doc(hidden)]` instead of `#[allow(missing_docs)]` on the const…
ogoffart Sep 11, 2024
cc34d64
Use `doc(hidden)` instead of `allow(missing_docs)` in the test harness
ogoffart Sep 11, 2024
16beabe
Auto merge of #130212 - DianQK:llvm-19, r=nikic
bors Sep 11, 2024
f7f8bdf
Auto merge of #130195 - folkertdev:naked-asm-outside-naked-fn, r=Amanieu
bors Sep 11, 2024
db40dc3
notify Miri when intrinsics are changed
RalfJung Sep 11, 2024
5b7be14
Revert warning empty patterns as unreachable
Nadrieril Aug 28, 2024
6c84238
docs: remove struct info
juliusl Sep 11, 2024
5bce6d4
Auto merge of #130197 - RalfJung:interp-perf, r=saethlin
bors Sep 11, 2024
954419a
Simplify some nested if statements
compiler-errors Sep 11, 2024
76e070f
Rollup merge of #129260 - wafarm:dont-suggest-closures, r=compiler-er…
matthiaskrgr Sep 11, 2024
1d6edee
Rollup merge of #129520 - tunawasabi:suggest-adding-struct-pattern-sy…
matthiaskrgr Sep 11, 2024
6d7ccad
Rollup merge of #129866 - root-goblin:patch-1, r=workingjubilee
matthiaskrgr Sep 11, 2024
5107ff4
Rollup merge of #130123 - FedericoBruzzone:master, r=compiler-errors
matthiaskrgr Sep 11, 2024
ff4b3d4
Rollup merge of #130161 - onur-ozkan:fmt-changed-files, r=Kobzol,Ralf…
matthiaskrgr Sep 11, 2024
e68dadb
Rollup merge of #130206 - GrigorenkoPV:WSAEDQUOT, r=ChrisDenton
matthiaskrgr Sep 11, 2024
78cf023
Rollup merge of #130207 - GrigorenkoPV:ERROR_CANT_RESOLVE_FILENAME, r…
matthiaskrgr Sep 11, 2024
66727ea
Rollup merge of #130219 - ogoffart:missing-docs-test, r=Urgau
matthiaskrgr Sep 11, 2024
678c249
Rollup merge of #130221 - vetleras:pub_search_path_new, r=chenyukang
matthiaskrgr Sep 11, 2024
3842ea6
miri: fix overflow detection for unsigned pointer offset
RalfJung Sep 11, 2024
5527076
chore: remove struct details
juliusl Sep 11, 2024
8d6b88b
Auto merge of #130237 - matthiaskrgr:rollup-qmgr8i7, r=matthiaskrgr
bors Sep 11, 2024
6ee87ae
Use the same span for attributes and Try expansion of ?
samueltardieu Sep 11, 2024
4967093
unify `llvm-bitcode-linker`, `wasm-component-ld` and llvm-tools logics
onur-ozkan Sep 7, 2024
af8d911
Also fix if in else
compiler-errors Sep 11, 2024
368231c
Limit `libc::link` usage to `nto70` target only, not NTO OS
nyurik Sep 11, 2024
6d06429
clippy::useless_conversion
compiler-errors Sep 11, 2024
e866f8a
Revert 'Stabilize -Znext-solver=coherence'
compiler-errors Sep 11, 2024
594de02
Properly deny const gen/async gen fns
compiler-errors Sep 11, 2024
d4fc76c
Introduce `'ra` lifetime name.
nnethercote Sep 10, 2024
6879ee6
Rollup merge of #129103 - Nadrieril:dont-warn-empty-unreachable, r=co…
workingjubilee Sep 11, 2024
abf0ac5
Rollup merge of #129696 - RalfJung:stdarch, r=Amanieu
workingjubilee Sep 11, 2024
312b597
Rollup merge of #129835 - RalfJung:float-tests, r=workingjubilee
workingjubilee Sep 11, 2024
c4488c4
Rollup merge of #130077 - madsmtm:watchos-arm-unwind, r=workingjubilee
workingjubilee Sep 11, 2024
a31a8fe
Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errors
workingjubilee Sep 11, 2024
eb9a4f7
Rollup merge of #130168 - juliusl:pr/fix-win-fs-change-time-links, r=…
workingjubilee Sep 11, 2024
1e3d1ad
Rollup merge of #130228 - RalfJung:intrinsics-notify, r=saethlin
workingjubilee Sep 11, 2024
1425982
Rollup merge of #130239 - RalfJung:miri-ptr-offset-unsigned, r=compil…
workingjubilee Sep 11, 2024
8265506
Rollup merge of #130244 - samueltardieu:qmark-expansion-span-fix, r=j…
workingjubilee Sep 11, 2024
b4201d3
Rollup merge of #130248 - nyurik:fix-129895, r=workingjubilee
workingjubilee Sep 11, 2024
3afb2bb
Auto merge of #130253 - workingjubilee:rollup-npqpnaf, r=workingjubilee
bors Sep 11, 2024
8dc2278
Remove unused functions from ast CoroutineKind
compiler-errors Sep 11, 2024
6c65d4f
Auto merge of #130183 - Marcondiro:unicode-16.0.0, r=Manishearth
bors Sep 12, 2024
ed9b2ba
Re-run coverage tests if `coverage-dump` was modified
Zalathar Sep 12, 2024
1f51450
Auto merge of #117465 - paulmenage:small-data-limit, r=compiler-errors
bors Sep 12, 2024
d6ef1b9
Expand PathBuf documentation
ChrisJefferson May 13, 2024
45c471b
Fixup docs for PathBuf
workingjubilee Sep 12, 2024
a7a3595
coverage: Separate creation of edge counters from building their sum
Zalathar Sep 11, 2024
2344133
coverage: Simplify creation of sum counters
Zalathar Sep 11, 2024
7c7372b
Auto merge of #129369 - madsmtm:apple-cc-linker-pass-target, r=jieyouxu
bors Sep 12, 2024
f753bc7
Auto merge of #130249 - compiler-errors:sad-new-solver-coherence, r=lcnr
bors Sep 12, 2024
8e037cc
Rollup merge of #125060 - ChrisJefferson:pathbuf-doc, r=workingjubilee
Zalathar Sep 12, 2024
65a5cd4
Rollup merge of #129367 - madsmtm:fix-apple-aarch64-deployment-target…
Zalathar Sep 12, 2024
c7162da
Rollup merge of #130156 - nebulark:test_buildinfo, r=jieyouxu
Zalathar Sep 12, 2024
c3d1be7
Rollup merge of #130160 - Scripter17:fix-slice-first_mut-doc, r=Amanieu
Zalathar Sep 12, 2024
3ba1275
Rollup merge of #130235 - compiler-errors:nested-if, r=michaelwoerister
Zalathar Sep 12, 2024
57020e0
Rollup merge of #130250 - compiler-errors:useless-conversion, r=jieyouxu
Zalathar Sep 12, 2024
a3d9d13
Rollup merge of #130252 - compiler-errors:const-gen, r=chenyukang
Zalathar Sep 12, 2024
458a57a
Rollup merge of #130256 - Zalathar:dump-stamp, r=jieyouxu
Zalathar Sep 12, 2024
675c99f
more eagerly discard constraints on overflow
lcnr Sep 12, 2024
394c406
Auto merge of #130269 - Zalathar:rollup-coxzt2t, r=Zalathar
bors Sep 12, 2024
d3ebd23
Add test for nalgebra hang in coherence
compiler-errors Sep 12, 2024
8c0ec05
Auto merge of #129992 - alexcrichton:update-compiler-builtins, r=tgro…
bors Sep 12, 2024
4428d6f
Rollup merge of #130101 - RalfJung:const-cleanup, r=fee1-dead
matthiaskrgr Sep 12, 2024
b0ff0b7
Rollup merge of #130208 - nnethercote:rslv-lifetime, r=petrochenkov
matthiaskrgr Sep 12, 2024
7cae463
Rollup merge of #130263 - Zalathar:sums, r=compiler-errors
matthiaskrgr Sep 12, 2024
cb1d80d
Rollup merge of #130273 - lcnr:overflow-no-constraints, r=compiler-er…
matthiaskrgr Sep 12, 2024
ed1602e
Rollup merge of #130276 - compiler-errors:nalgebra-hang, r=lcnr
matthiaskrgr Sep 12, 2024
8b75004
Fix anon const def-creation when macros are involved
camelid Aug 15, 2024
e0bd011
Re-enable `ConstArgKind::Path` lowering by default
camelid Sep 8, 2024
2e8db5e
Auto merge of #130281 - matthiaskrgr:rollup-1b2ibs8, r=matthiaskrgr
bors Sep 12, 2024
b4b2b35
simplify the suggestion notes
dingxiangfei2009 Sep 12, 2024
adaff53
Auto merge of #130040 - onur-ozkan:llvm-tools-with-ci-rustc, r=Kobzol
bors Sep 12, 2024
d3a8524
Auto merge of #129137 - camelid:lazy-def-macro-const, r=BoxyUwU
bors Sep 13, 2024
df8e6c3
Revert "Auto merge of #130040 - onur-ozkan:llvm-tools-with-ci-rustc, …
ehuss Sep 13, 2024
a5efa01
Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu
bors Sep 13, 2024
d0985bb
Auto merge of #130292 - ehuss:revert-130040, r=onur-ozkan
bors Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 31 additions & 18 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,14 +1188,7 @@ impl Expr {
///
/// Does not ensure that the path resolves to a const param, the caller should check this.
pub fn is_potential_trivial_const_arg(&self) -> bool {
let this = if let ExprKind::Block(block, None) = &self.kind
&& let [stmt] = block.stmts.as_slice()
&& let StmtKind::Expr(expr) = &stmt.kind
{
expr
} else {
self
};
let this = self.maybe_unwrap_block();

if let ExprKind::Path(None, path) = &this.kind
&& path.is_potential_trivial_const_arg()
Expand All @@ -1206,6 +1199,17 @@ impl Expr {
}
}

pub fn maybe_unwrap_block(&self) -> &Expr {
if let ExprKind::Block(block, None) = &self.kind
&& let [stmt] = block.stmts.as_slice()
&& let StmtKind::Expr(expr) = &stmt.kind
{
expr
} else {
self
}
}

pub fn to_bound(&self) -> Option<GenericBound> {
match &self.kind {
ExprKind::Path(None, path) => Some(GenericBound::Trait(
Expand Down Expand Up @@ -2418,11 +2422,22 @@ impl InlineAsmOperand {
}
}

#[derive(Clone, Copy, Encodable, Decodable, Debug, HashStable_Generic)]
pub enum AsmMacro {
/// The `asm!` macro
Asm,
/// The `global_asm!` macro
GlobalAsm,
/// The `naked_asm!` macro
NakedAsm,
}

/// Inline assembly.
///
/// E.g., `asm!("NOP");`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct InlineAsm {
pub asm_macro: AsmMacro,
pub template: Vec<InlineAsmTemplatePiece>,
pub template_strs: Box<[(Symbol, Option<Symbol>, Span)]>,
pub operands: Vec<(InlineAsmOperand, Span)>,
Expand Down Expand Up @@ -2591,12 +2606,12 @@ impl CoroutineKind {
}
}

pub fn is_async(self) -> bool {
matches!(self, CoroutineKind::Async { .. })
}

pub fn is_gen(self) -> bool {
matches!(self, CoroutineKind::Gen { .. })
pub fn as_str(self) -> &'static str {
match self {
CoroutineKind::Async { .. } => "async",
CoroutineKind::Gen { .. } => "gen",
CoroutineKind::AsyncGen { .. } => "async gen",
}
}

pub fn closure_id(self) -> NodeId {
Expand Down Expand Up @@ -3475,7 +3490,7 @@ impl From<ForeignItemKind> for ItemKind {
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
match foreign_item_kind {
ForeignItemKind::Static(box static_foreign_item) => {
ItemKind::Static(Box::new(static_foreign_item.into()))
ItemKind::Static(Box::new(static_foreign_item))
}
ForeignItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind),
ForeignItemKind::TyAlias(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind),
Expand All @@ -3489,9 +3504,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {

fn try_from(item_kind: ItemKind) -> Result<ForeignItemKind, ItemKind> {
Ok(match item_kind {
ItemKind::Static(box static_item) => {
ForeignItemKind::Static(Box::new(static_item.into()))
}
ItemKind::Static(box static_item) => ForeignItemKind::Static(Box::new(static_item)),
ItemKind::Fn(fn_kind) => ForeignItemKind::Fn(fn_kind),
ItemKind::TyAlias(ty_alias_kind) => ForeignItemKind::TyAlias(ty_alias_kind),
ItemKind::MacCall(a) => ForeignItemKind::MacCall(a),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/ast_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl HasTokens for StmtKind {
StmtKind::Let(local) => local.tokens.as_ref(),
StmtKind::Item(item) => item.tokens(),
StmtKind::Expr(expr) | StmtKind::Semi(expr) => expr.tokens(),
StmtKind::Empty => return None,
StmtKind::Empty => None,
StmtKind::MacCall(mac) => mac.tokens.as_ref(),
}
}
Expand All @@ -162,7 +162,7 @@ impl HasTokens for StmtKind {
StmtKind::Let(local) => Some(&mut local.tokens),
StmtKind::Item(item) => item.tokens_mut(),
StmtKind::Expr(expr) | StmtKind::Semi(expr) => expr.tokens_mut(),
StmtKind::Empty => return None,
StmtKind::Empty => None,
StmtKind::MacCall(mac) => Some(&mut mac.tokens),
}
}
Expand Down
20 changes: 9 additions & 11 deletions compiler/rustc_ast/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,16 @@ pub fn entry_point_type(
EntryPointType::Start
} else if attr::contains_name(attrs, sym::rustc_main) {
EntryPointType::RustcMainAttr
} else {
if let Some(name) = name
&& name == sym::main
{
if at_root {
// This is a top-level function so it can be `main`.
EntryPointType::MainNamed
} else {
EntryPointType::OtherMain
}
} else if let Some(name) = name
&& name == sym::main
{
if at_root {
// This is a top-level function so it can be `main`.
EntryPointType::MainNamed
} else {
EntryPointType::None
EntryPointType::OtherMain
}
} else {
EntryPointType::None
}
}
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ fn walk_anon_const<T: MutVisitor>(vis: &mut T, AnonConst { id, value }: &mut Ano
fn walk_inline_asm<T: MutVisitor>(vis: &mut T, asm: &mut InlineAsm) {
// FIXME: Visit spans inside all this currently ignored stuff.
let InlineAsm {
asm_macro: _,
template: _,
template_strs: _,
operands,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ pub fn walk_anon_const<'a, V: Visitor<'a>>(visitor: &mut V, constant: &'a AnonCo

pub fn walk_inline_asm<'a, V: Visitor<'a>>(visitor: &mut V, asm: &'a InlineAsm) -> V::Result {
let InlineAsm {
asm_macro: _,
template: _,
template_strs: _,
operands,
Expand Down
14 changes: 9 additions & 5 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let parent_def_id = self.current_def_id_parent;
let node_id = self.next_node_id();
// HACK(min_generic_const_args): see lower_anon_const
if !self.tcx.features().const_arg_path
|| !expr.is_potential_trivial_const_arg()
{
if !expr.is_potential_trivial_const_arg() {
self.create_def(
parent_def_id,
node_id,
Expand Down Expand Up @@ -474,8 +472,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
);
let line_spans =
self.arena.alloc_from_iter(asm.line_spans.iter().map(|span| self.lower_span(*span)));
let hir_asm =
hir::InlineAsm { template, template_strs, operands, options: asm.options, line_spans };
let hir_asm = hir::InlineAsm {
asm_macro: asm.asm_macro,
template,
template_strs,
operands,
options: asm.options,
line_spans,
};
self.arena.alloc(hir_asm)
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let node_id = self.next_node_id();

// HACK(min_generic_const_args): see lower_anon_const
if !self.tcx.features().const_arg_path || !arg.is_potential_trivial_const_arg() {
if !arg.is_potential_trivial_const_arg() {
// Add a definition for the in-band const def.
self.create_def(parent_def_id, node_id, kw::Empty, DefKind::AnonConst, f.span);
}
Expand Down Expand Up @@ -1837,7 +1837,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
Safety::Default,
sym::allow,
sym::unreachable_code,
self.lower_span(span),
try_span,
);
let attrs: AttrVec = thin_vec![attr];

Expand Down
36 changes: 17 additions & 19 deletions compiler/rustc_ast_lowering/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,24 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {

// Make sure that the DepNode of some node coincides with the HirId
// owner of that node.
if cfg!(debug_assertions) {
if hir_id.owner != self.owner {
span_bug!(
span,
"inconsistent HirId at `{:?}` for `{:?}`: \
if cfg!(debug_assertions) && hir_id.owner != self.owner {
span_bug!(
span,
"inconsistent HirId at `{:?}` for `{:?}`: \
current_dep_node_owner={} ({:?}), hir_id.owner={} ({:?})",
self.tcx.sess.source_map().span_to_diagnostic_string(span),
node,
self.tcx
.definitions_untracked()
.def_path(self.owner.def_id)
.to_string_no_crate_verbose(),
self.owner,
self.tcx
.definitions_untracked()
.def_path(hir_id.owner.def_id)
.to_string_no_crate_verbose(),
hir_id.owner,
)
}
self.tcx.sess.source_map().span_to_diagnostic_string(span),
node,
self.tcx
.definitions_untracked()
.def_path(self.owner.def_id)
.to_string_no_crate_verbose(),
self.owner,
self.tcx
.definitions_untracked()
.def_path(hir_id.owner.def_id)
.to_string_no_crate_verbose(),
hir_id.owner,
)
}

self.nodes[hir_id.local_id] = ParentedNode { parent: self.parent_node, node };
Expand Down
10 changes: 4 additions & 6 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
.map_or(Const::No, |attr| Const::Yes(attr.span)),
_ => Const::No,
}
} else if self.tcx.is_const_trait(def_id) {
// FIXME(effects) span
Const::Yes(self.tcx.def_ident_span(def_id).unwrap())
} else {
if self.tcx.is_const_trait(def_id) {
// FIXME(effects) span
Const::Yes(self.tcx.def_ident_span(def_id).unwrap())
} else {
Const::No
}
Const::No
}
} else {
Const::No
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
span: Span,
) -> &'hir hir::ConstArg<'hir> {
let ct_kind = match res {
Res::Def(DefKind::ConstParam, _) if self.tcx.features().const_arg_path => {
Res::Def(DefKind::ConstParam, _) => {
let qpath = self.lower_qpath(
ty_id,
&None,
Expand Down Expand Up @@ -2410,8 +2410,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
self.resolver.get_partial_res(expr.id).and_then(|partial_res| partial_res.full_res());
debug!("res={:?}", maybe_res);
// FIXME(min_generic_const_args): for now we only lower params to ConstArgKind::Path
if self.tcx.features().const_arg_path
&& let Some(res) = maybe_res
if let Some(res) = maybe_res
&& let Res::Def(DefKind::ConstParam, _) = res
&& let ExprKind::Path(qself, path) = &expr.kind
{
Expand Down Expand Up @@ -2442,7 +2441,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
/// See [`hir::ConstArg`] for when to use this function vs
/// [`Self::lower_anon_const_to_const_arg`].
fn lower_anon_const_to_anon_const(&mut self, c: &AnonConst) -> &'hir hir::AnonConst {
if self.tcx.features().const_arg_path && c.value.is_potential_trivial_const_arg() {
if c.value.is_potential_trivial_const_arg() {
// HACK(min_generic_const_args): see DefCollector::visit_anon_const
// Over there, we guess if this is a bare param and only create a def if
// we think it's not. However we may can guess wrong (see there for example)
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_ast_passes/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ ast_passes_body_in_extern = incorrect `{$kind}` inside `extern` block

ast_passes_bound_in_context = bounds on `type`s in {$ctx} have no effect

ast_passes_const_and_async = functions cannot be both `const` and `async`
.const = `const` because of this
.async = `async` because of this
.label = {""}

ast_passes_const_and_c_variadic = functions cannot be both `const` and C-variadic
.const = `const` because of this
.variadic = C-variadic because of this

ast_passes_const_and_coroutine = functions cannot be both `const` and `{$coroutine_kind}`
.const = `const` because of this
.coroutine = `{$coroutine_kind}` because of this
.label = {""}

ast_passes_const_bound_trait_object = const trait bounds are not allowed in trait object types

ast_passes_const_without_body =
Expand Down
31 changes: 13 additions & 18 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,13 @@ impl<'a> AstValidator<'a> {
fn check_item_safety(&self, span: Span, safety: Safety) {
match self.extern_mod_safety {
Some(extern_safety) => {
if matches!(safety, Safety::Unsafe(_) | Safety::Safe(_)) {
if extern_safety == Safety::Default {
self.dcx().emit_err(errors::InvalidSafetyOnExtern {
item_span: span,
block: Some(self.current_extern_span().shrink_to_lo()),
});
}
if matches!(safety, Safety::Unsafe(_) | Safety::Safe(_))
&& extern_safety == Safety::Default
{
self.dcx().emit_err(errors::InvalidSafetyOnExtern {
item_span: span,
block: Some(self.current_extern_span().shrink_to_lo()),
});
}
}
None => {
Expand Down Expand Up @@ -1418,21 +1418,16 @@ impl<'a> Visitor<'a> for AstValidator<'a> {

// Functions cannot both be `const async` or `const gen`
if let Some(&FnHeader {
constness: Const::Yes(cspan),
constness: Const::Yes(const_span),
coroutine_kind: Some(coroutine_kind),
..
}) = fk.header()
{
let aspan = match coroutine_kind {
CoroutineKind::Async { span: aspan, .. }
| CoroutineKind::Gen { span: aspan, .. }
| CoroutineKind::AsyncGen { span: aspan, .. } => aspan,
};
// FIXME(gen_blocks): Report a different error for `const gen`
self.dcx().emit_err(errors::ConstAndAsync {
spans: vec![cspan, aspan],
cspan,
aspan,
self.dcx().emit_err(errors::ConstAndCoroutine {
spans: vec![coroutine_kind.span(), const_span],
const_span,
coroutine_span: coroutine_kind.span(),
coroutine_kind: coroutine_kind.as_str(),
span,
});
}
Expand Down
11 changes: 6 additions & 5 deletions compiler/rustc_ast_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,16 +657,17 @@ pub(crate) enum TildeConstReason {
}

#[derive(Diagnostic)]
#[diag(ast_passes_const_and_async)]
pub(crate) struct ConstAndAsync {
#[diag(ast_passes_const_and_coroutine)]
pub(crate) struct ConstAndCoroutine {
#[primary_span]
pub spans: Vec<Span>,
#[label(ast_passes_const)]
pub cspan: Span,
#[label(ast_passes_async)]
pub aspan: Span,
pub const_span: Span,
#[label(ast_passes_coroutine)]
pub coroutine_span: Span,
#[label]
pub span: Span,
pub coroutine_kind: &'static str,
}

#[derive(Diagnostic)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,5 +1240,5 @@ pub fn parse_confusables(attr: &Attribute) -> Option<Vec<Symbol>> {
candidates.push(meta_lit.symbol);
}

return Some(candidates);
Some(candidates)
}
Loading