about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-02-13Add missing riscv32imafc_unknown_none_elf env vars to dist-various-1Nikita Popov-0/+2
These are necessary now that compiler-builtins requires a working C compiler for riscv.
2024-02-13Use CMAKE_MSVC_RUNTIME_LIBRARY instead of LLVM_USE_CRT_*Nikita Popov-3/+1
This cmake option has been removed in: https://github.com/llvm/llvm-project/commit/618e5d2c2d8e0c288c37b883ece553ca4f994c2e
2024-02-13Update to LLVM 18Nikita Popov-0/+0
2024-02-13Prevent rustfmt from messing up experimental syntaxOli Scherer-0/+1
2024-02-13Merge from rustcThe Miri Conjob Bot-46/+117
2024-02-13Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-02-13Replace clean::InstantiationParam with clean::GenericArgLeón Orell Valerian Liehr-73/+31
2024-02-12Rollup merge of #120979 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/edition-guide 1 commits in baafacc6d8701269dab1e1e333f3547fb54b5a59..76bd48a273a0e0413a3bf22c699112d41497b99e 2024-02-10 20:50:34 UTC to 2024-02-10 20:50:34 UTC - Set up scaffolding for 2024 (rust-lang/edition-guide#288) ## rust-lang/reference 4 commits in a0b119535e7740f68494c4f0582f7ad008b00ccd..8227666de13f6e7bb32dea9dc42e841adb5ce4b7 2024-02-12 03:04:15 UTC to 2024-01-30 20:10:53 UTC - Fix a typo in external-blocks.md (rust-lang/reference#1467) - Fix syntax in `'static lifetime elision` section of `lifetime-elision.md` (rust-lang/reference#1463) - Fix markdown backslash for FLOAT_LITERAL (rust-lang/reference#1464) - C string literal expressions (rust-lang/reference#1457) ## rust-lang/rust-by-example 5 commits in 179256a445d6144f5f371fdefb993f48f33978b0..e188d5d466f7f3ff9f1d518393235f4fe951be46 2024-02-07 17:16:00 UTC to 2024-01-31 17:34:10 UTC - Update macros.md (rust-lang/rust-by-example#1815) - Update borrow.md (rust-lang/rust-by-example#1814) - Fixes the bug: https://github.com/rust-lang/rust-by-example/issues/1721 (rust-lang/rust-by-example#1811) - std_misc/process/pipe.md: Fix typo in pangram string (rust-lang/rust-by-example#1809) - Add expected error behavior into docs (rust-lang/rust-by-example#1810) ## rust-lang/rustc-dev-guide 9 commits in ec287e332777627185be4798ad22599ffe7b84aa..1f30cc7cca9a3433bc1872abdc98960b36c21ca0 2024-02-11 05:36:15 UTC to 2024-01-29 19:49:51 UTC - fix sentence (rust-lang/rustc-dev-guide#1882) - Some updates for recent diagnostics changes. (rust-lang/rustc-dev-guide#1883) - Rename occurrences of 'delay_span_bug' to 'span_delayed_bug' (rust-lang/rustc-dev-guide#1881) - Update for upcoming markdown changes. (rust-lang/rustc-dev-guide#1880) - Update uses of renamed BoxMeUp to PanicPayload (rust-lang/rustc-dev-guide#1878) - Add links for arena and interning. (rust-lang/rustc-dev-guide#1868) - Improving macro expansion section (rust-lang/rustc-dev-guide#1875) - Replace letters by foo, bar and buz in lexing example (rust-lang/rustc-dev-guide#1870) - Fix some broken links (rust-lang/rustc-dev-guide#1877)
2024-02-12Rollup merge of #120958 - ShoyuVanilla:remove-subst, r=oli-obkMatthias Krüger-12/+18
Dejargonize `subst` In favor of #110793, replace almost every occurence of `subst` and `substitution` from rustc codes, but they still remains in subtrees under `src/tools/` like clippy and test codes (I'd like to replace them after this)
2024-02-12Rollup merge of #120950 - compiler-errors:miri-async-closurs, r=RalfJung,oli-obkMatthias Krüger-1/+44
Fix async closures in CTFE First commit renames `is_coroutine_or_closure` into `is_closure_like`, because `is_coroutine_or_closure_or_coroutine_closure` seems confusing and long. Second commit fixes some forgotten cases where we want to handle `TyKind::CoroutineClosure` the same as closures and coroutines. The test exercises the change to `ValidityVisitor::aggregate_field_path_elem` which is the source of #120946, but not the change to `UsedParamsNeedSubstVisitor`, though I feel like it's not that big of a deal. Let me know if you'd like for me to look into constructing a test for the latter, though I have no idea what it'd look like (we can't assert against `TooGeneric` anywhere?). Fixes #120946 r? oli-obk cc ``@RalfJung``
2024-02-12Rollup merge of #120273 - klensy:ct-run, r=onur-ozkanMatthias Krüger-11/+16
compiletest: few naive improvements Tested on `python x.py --stage=1 t tests/ui/borrowck/ --force-rerun`, see individual commits. Wall time didn't improved :-) .
2024-02-12Rollup merge of #119451 - Kobzol:ci-pr-clippy, r=Mark-SimulacrumMatthias Krüger-5/+1
Gate PR CI on clippy correctness lints Implements part of https://github.com/rust-lang/compiler-team/issues/709. Note that `x.py clippy compiler` also checks the standard library, because it needs to be checked before the compiler. This happens even with `x.py clippy --stage 0`.
2024-02-12Rollup merge of #118983 - Urgau:invalid_ref_casting-bigger-layout, r=oli-obkMatthias Krüger-11/+13
Warn on references casting to bigger memory layout This PR extends the [`invalid_reference_casting`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#invalid-reference-casting) lint (*deny-by-default*) which currently lint on `&T -> &mut T` casting to also lint on `&(mut) A -> &(mut) B` where `size_of::<B>() > size_of::<A>()` (bigger memory layout requirement). The goal is to detect such cases: ```rust let u8_ref: &u8 = &0u8; let u64_ref: &u64 = unsafe { &*(u8_ref as *const u8 as *const u64) }; //~^ ERROR casting references to a bigger memory layout is undefined behavior let mat3 = Mat3 { a: Vec3(0i32, 0, 0), b: Vec3(0, 0, 0), c: Vec3(0, 0, 0) }; let mat3 = unsafe { &*(&mat3 as *const _ as *const [[i64; 3]; 3]) }; //~^ ERROR casting references to a bigger memory layout is undefined behavior ``` This is added to help people who write unsafe code, especially when people have matrix struct that they cast to simple array of arrays. EDIT: One caveat, due to the [`&Header`](https://github.com/rust-lang/unsafe-code-guidelines/issues/256) uncertainty the lint only fires when it can find the underline allocation. ~~I have manually tested all the new expressions that warn against Miri, and they all report immediate UB.~~ r? ``@est31``
2024-02-12Allow invalid ref casting in Miri unaligned_ref_addr_of testUrgau-0/+2
2024-02-12Avoid UB in clippy transmute_ptr_to_ptr UI testUrgau-11/+11
2024-02-12Support safe intrinsics with fallback bodiesOli Scherer-1/+1
Turn `is_val_statically_known` into such an intrinsic to demonstrate. It is perfectly safe to call after all.
2024-02-12Auto merge of #120980 - matthiaskrgr:rollup-dsjsqql, r=matthiaskrgrbors-3/+5
Rollup of 11 pull requests Successful merges: - #120765 (Reorder diagnostics API) - #120833 (More internal emit diagnostics cleanups) - #120899 (Gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`) - #120917 (Remove a bunch of dead parameters in functions) - #120928 (Add test for recently fixed issue) - #120933 (check_consts: fix duplicate errors, make importance consistent) - #120936 (improve `btree_cursors` functions documentation) - #120944 (Check that the ABI of the instance we are inlining is correct) - #120956 (Clean inlined type alias with correct param-env) - #120962 (Add myself to library/std review) - #120972 (fix ICE for deref coercions with type errors) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-12Rollup merge of #120956 - compiler-errors:clean-type-alias, r=GuillaumeGomezMatthias Krüger-1/+3
Clean inlined type alias with correct param-env We were cleaning the `hir::Ty` of a type alias item in the param-env of the item that *references* the type alias, and not the alias's own param-env. Fixes #120954
2024-02-12Update booksrustbot-0/+0
2024-02-12also test pthread_mutex/rwlock directlyRalf Jung-21/+146
turns out one of the synchronizations in rwlock_writer_unlock is unnecessary
2024-02-12comment tweaksRalf Jung-11/+10
2024-02-12Merge from rustcRalf Jung-3564/+15375
2024-02-12Preparing for merge from rustcRalf Jung-1/+1
2024-02-12Implement intrinsics with fallback bodiesOli Scherer-3/+51
2024-02-12Make `is_intrinsic` query return the intrinsic nameOli Scherer-1/+1
2024-02-12Tweak delayed bug mentions.Nicholas Nethercote-2/+2
Now that we have both `delayed_bug` and `span_delayed_bug`, it makes sense to use the generic term "delayed bug" more.
2024-02-12Dejargnonize substShoyu Vanilla-12/+18
2024-02-12Clean inlined type alias with correct param-envMichael Goulet-1/+3
2024-02-12Improve some codes according to the reviewsFrank King-4/+0
- improve diagnostics of field uniqueness check and representation check - simplify the implementation of field uniqueness check - remove some useless codes and improvement neatness
2024-02-12Fix compile error in rustdoc.Frank King-9/+2
2024-02-12Add rustfmt test from #117942Frank King-0/+12
2024-02-12Lower anonymous structs or unions to HIRFrank King-3/+19
2024-02-12Auto merge of #120951 - matthiaskrgr:rollup-0nnm7dv, r=matthiaskrgrbors-116/+90
Rollup of 8 pull requests Successful merges: - #110483 (Create try_new function for ThinBox) - #120740 (Make cmath.rs a single file) - #120872 (hir: Refactor getters for HIR parents) - #120880 (add note on comparing vtables / function pointers) - #120885 (interpret/visitor: ensure we only see normalized types) - #120888 (assert_unsafe_precondition cleanup) - #120897 (Encode `coroutine_for_closure` for foreign crates) - #120937 ([docs] Update armv6k-nintendo-3ds platform docs for outdated info) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-11Rollup merge of #120937 - ian-h-chamberlain:docs/update-3ds-links-and-info, ↵Matthias Krüger-14/+12
r=JohnTitor [docs] Update armv6k-nintendo-3ds platform docs for outdated info Mostly just fixing links and references to renamed crates, but also updating a bit of outdated info as well. CC `@Meziu` `@AzureMarker`
2024-02-11Rollup merge of #120872 - petrochenkov:opthirpar, r=cjgillotMatthias Krüger-102/+78
hir: Refactor getters for HIR parents See individual commits. I ended up removing on of the FIXMEs from https://github.com/rust-lang/rust/pull/120206 instead of addressing it.
2024-02-11Auto merge of #120619 - compiler-errors:param, r=lcnrbors-28/+59
Assert that params with the same *index* have the same *name* Found this bug when trying to build libcore with the new solver, since it will canonicalize two params with the same index into *different* placeholders if those params differ by name.
2024-02-11Fix async closures in CTFEMichael Goulet-0/+43
2024-02-11is_closure_likeMichael Goulet-1/+1
2024-02-11Auto merge of #120803 - onur-ozkan:fix-compilation-cache, r=Mark-Simulacrumbors-171/+250
always run `configure_linker` except for mir-opt tests `configure_linker` now runs consistently unless it's for mir-opt tests. Previously `!= "check"` condition was causing dirt in the cargo cache between runs of `x anything-but-not-check` and `x check`. Fixes #120768 cc `@saethlin`
2024-02-11Gate PR CI on clippy correctness lintsJakub Beránek-5/+1
2024-02-11Auto merge of #120903 - matthiaskrgr:rollup-tmsuzth, r=matthiaskrgrbors-4/+54
Rollup of 9 pull requests Successful merges: - #119213 (simd intrinsics: add simd_shuffle_generic and other missing intrinsics) - #120272 (Suppress suggestions in derive macro) - #120773 (large_assignments: Allow moves into functions) - #120874 (Take empty `where` bounds into account when suggesting predicates) - #120882 (interpret/write_discriminant: when encoding niched variant, ensure the stored value matches) - #120883 (interpret: rename ReadExternStatic → ExternStatic) - #120890 (Adapt `llvm-has-rust-patches` validation to take `llvm-config` into account.) - #120895 (don't skip coercions for types with errors) - #120896 (Print kind of coroutine closure) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-11Auto merge of #3295 - RalfJung:imported_main, r=RalfJungbors-0/+9
add tests for imported_main
2024-02-11add tests for imported_mainRalf Jung-0/+9
2024-02-11Update links to rust3ds and outdated infoIan Chamberlain-14/+12
2024-02-11Auto merge of #120920 - matthiaskrgr:rollup-jsryr8e, r=matthiaskrgrbors-3238/+14916
Rollup of 10 pull requests Successful merges: - #117740 (Add some links and minor explanatory comments to `std::fmt`) - #118307 (Remove an unneeded helper from the tuple library code) - #119242 (Suggest less bug-prone construction of Duration in docs) - #119449 (Fix `clippy::correctness` in the library) - #120307 (core: add Duration constructors) - #120459 (Document various I/O descriptor/handle conversions) - #120729 (Update mdbook to 0.4.37) - #120763 (Suggest pattern tests when modifying exhaustiveness) - #120906 (Remove myself from some review rotations) - #120916 (Subtree update of ` rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
2024-02-11Auto merge of #3285 - sunfishcode:sunfishcode/mmap64, r=RalfJungbors-16/+36
Implement the `mmap64` foreign item. `mmap64` is like `mmap` but uses a 64-bit integer instead of `off_t` for the offset parameter.
2024-02-11Move `mmap64`'s implementation under "File related shims".Dan Gohman-8/+8
2024-02-11Make the `mmap64` implementation Linux-specific.Dan Gohman-6/+9
`mmap64` is only defined on Linux, so move the implementation to Linux-specific code.
2024-02-11std: enabling new netbsd (10) calls.David Carlier-0/+1
Introducing a new config for this purpose as NetBSD 9 or 8 will be still around for a good while. For now, we re finally enabling sys::unix::rand::getrandom.
2024-02-11Rollup merge of #120916 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-3027/+14636
Subtree update of ` rust-analyzer` r? `@ghost`